]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
- Fixed a bug with the 'ddns-updates' boolean server configuration
authorDavid Hankins <dhankins@isc.org>
Tue, 10 Jul 2007 21:42:05 +0000 (21:42 +0000)
committerDavid Hankins <dhankins@isc.org>
Tue, 10 Jul 2007 21:42:05 +0000 (21:42 +0000)
  parameter, which caused the server to fail. [ISC-Bugs #17002]

RELNOTES
common/tree.c

index 44bc6424ff0d21002839b1a9c34bb6ec4a99c9c3..5c4c92781b97c6cf7fe7149e24d0dbe41a466c03 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -90,6 +90,9 @@ suggested fixes to <dhcp-users@isc.org>.
 
 - Fixed a bug parsing DHCPv6 client-id's in host-identifier statements
 
+- Fixed a bug with the 'ddns-updates' boolean server configuration
+  parameter, which caused the server to fail.
+
                        Changes since 4.0.0-20070413
 
 - Old (expired) leases are now cleaned.
index aa7cd03837a0d89fb1fc2abafd4732c33428afff..4780a7d6a22150e4eedf2633e4010ef16ef298cb 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: tree.c,v 1.116 2007/06/07 15:52:29 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium.  All rights reserved.\n";
+"$Id: tree.c,v 1.117 2007/07/10 21:42:05 dhankins Exp $ Copyright (c) 2004-2007 Internet Systems Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -2972,12 +2972,16 @@ int evaluate_boolean_option_cache (ignorep, packet,
                                    cfg_options, scope, oc, file, line))
                return 0;
 
+       /* The boolean option cache is actually a trinary value.  Zero is
+        * off, one is on, and 2 is 'ignore'.
+        */
        if (ds.len) {
                result = ds.data [0];
                if (result == 2) {
                        result = 0;
-                       *ignorep = 1;
-               } else
+                       if (ignorep != NULL)
+                               *ignorep = 1;
+               } else if (ignorep != NULL)
                        *ignorep = 0;
        } else
                result = 0;