From: Ted Lemon Date: Fri, 29 Dec 2000 06:48:14 +0000 (+0000) Subject: Only do new-style ddns updates if that style is enabled. X-Git-Tag: V3-BETA-2-PATCH-12~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fac73d63820671222c3faea0d2885fe23f590c3;p=thirdparty%2Fdhcp.git Only do new-style ddns updates if that style is enabled. --- diff --git a/server/ddns.c b/server/ddns.c index f2dfd831b..4e45dfe32 100644 --- a/server/ddns.c +++ b/server/ddns.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: ddns.c,v 1.2 2000/12/28 23:23:46 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: ddns.c,v 1.3 2000/12/29 06:48:14 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -707,6 +707,9 @@ int ddns_updates (struct packet *packet, int result = 0; ns_rcode rcode1, rcode2; + if (ddns_update_style != 2) + return 0; + /* Can only cope with IPv4 addrs at the moment. */ if (lease -> ip_addr . len != 4) return 0; @@ -959,11 +962,13 @@ int ddns_removals(struct lease *lease) { struct data_string ddns_dhcid; ns_rcode rcode; + if (ddns_update_style != 2) + return 1; + /* No scope implies that DDNS has not been performed for this lease. */ if (!lease -> scope) return 1; - /* * Look up stored names. */