summaryrefslogtreecommitdiff
path: root/common/tree.c
diff options
context:
space:
mode:
authorDavid Hankins <dhankins@isc.org>2007-07-10 21:42:05 +0000
committerDavid Hankins <dhankins@isc.org>2007-07-10 21:42:05 +0000
commit26be82affae3c54ed42ade07e58a0f5b5b32d3e3 (patch)
tree070f22d833546a5fb74fcb3846f39eced73f73d0 /common/tree.c
parent2e13ba554c5bf91adb70ec30391dc003266933fc (diff)
downloadisc-dhcp-26be82affae3c54ed42ade07e58a0f5b5b32d3e3.tar.gz
- Fixed a bug with the 'ddns-updates' boolean server configuration
parameter, which caused the server to fail. [ISC-Bugs #17002]
Diffstat (limited to 'common/tree.c')
-rw-r--r--common/tree.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/common/tree.c b/common/tree.c
index aa7cd038..4780a7d6 100644
--- a/common/tree.c
+++ b/common/tree.c
@@ -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;