diff options
-rw-r--r-- | RELNOTES | 3 | ||||
-rw-r--r-- | common/conflex.c | 95 | ||||
-rw-r--r-- | includes/dhctoken.h | 3 | ||||
-rw-r--r-- | server/confpars.c | 6 |
4 files changed, 69 insertions, 38 deletions
@@ -91,6 +91,9 @@ the README file. failover connect yet (e.g.: connection refused, asynch socket connect() timeouts). +- A bug was fixed that caused the 'conflict-done' state to fail to be parsed + in failover state records. + Changes since 3.1.2rc1 - None. diff --git a/common/conflex.c b/common/conflex.c index 453c91cd..4e6d8abb 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.105.8.3 2008/01/22 19:02:50 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.105.8.4 2009/06/17 21:50:03 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -607,45 +607,68 @@ static enum dhcp_token intern (atom, dfv) return BOUND; break; case 'c': - if (!strcasecmp (atom + 1, "ase")) + if (!strcasecmp(atom + 1, "ase")) return CASE; - if (!strcasecmp (atom + 1, "ommit")) - return COMMIT; - if (!strcasecmp (atom + 1, "ode")) - return CODE; - if (!strcasecmp (atom + 1, "onfig-option")) - return CONFIG_OPTION; - if (!strcasecmp (atom + 1, "heck")) + if (!strcasecmp(atom + 1, "heck")) return CHECK; - if (!strcasecmp (atom + 1, "lass")) - return CLASS; - if (!strcasecmp (atom + 1, "lose")) - return TOKEN_CLOSE; - if (!strcasecmp (atom + 1, "reate")) - return TOKEN_CREATE; - if (!strcasecmp (atom + 1, "iaddr")) + if (!strcasecmp(atom + 1, "iaddr")) return CIADDR; - if (!strncasecmp (atom + 1, "lient", 5)) { - if (!strcasecmp (atom + 6, "-identifier")) - return CLIENT_IDENTIFIER; - if (!strcasecmp (atom + 6, "-hostname")) - return CLIENT_HOSTNAME; - if (!strcasecmp (atom + 6, "-state")) - return CLIENT_STATE; - if (!strcasecmp (atom + 6, "-updates")) - return CLIENT_UPDATES; - if (!strcasecmp (atom + 6, "s")) - return CLIENTS; + if (isascii(atom[1]) && + tolower((unsigned char)atom[1]) == 'l') { + if (!strcasecmp(atom + 2, "ass")) + return CLASS; + if (!strncasecmp(atom + 2, "ient", 4)) { + if (!strcasecmp(atom + 6, "s")) + return CLIENTS; + if (atom[7] == '-') { + if (!strcasecmp(atom + 7, "hostname")) + return CLIENT_HOSTNAME; + if (!strcasecmp(atom + 7, "identifier")) + return CLIENT_IDENTIFIER; + if (!strcasecmp(atom + 7, "state")) + return CLIENT_STATE; + if (!strcasecmp(atom + 7, "updates")) + return CLIENT_UPDATES; + break; + } + break; + } + if (!strcasecmp(atom + 2, "ose")) + return TOKEN_CLOSE; + if (!strcasecmp(atom + 2, "tt")) + return CLTT; + break; } - if (!strcasecmp (atom + 1, "oncat")) - return CONCAT; - if (!strcasecmp (atom + 1, "onnect")) - return CONNECT; - if (!strcasecmp (atom + 1, "ommunications-interrupted")) - return COMMUNICATIONS_INTERRUPTED; - if (!strcasecmp (atom + 1, "ltt")) - return CLTT; - break; + if (isascii(atom[1]) && + tolower((unsigned char)atom[1]) == 'o') { + if (!strcasecmp(atom + 2, "de")) + return CODE; + if (isascii(atom[2]) && + tolower((unsigned char)atom[2]) == 'm') { + if (!strcasecmp(atom + 3, "mit")) + return COMMIT; + if (!strcasecmp(atom + 3, + "munications-interrupted")) + return COMMUNICATIONS_INTERRUPTED; + break; + } + if (isascii(atom[2]) && + tolower((unsigned char)atom[2]) == 'n') { + if (!strcasecmp(atom + 3, "cat")) + return CONCAT; + if (!strcasecmp(atom + 3, "fig-option")) + return CONFIG_OPTION; + if (!strcasecmp(atom + 3, "flict-done")) + return CONFLICT_DONE; + if (!strcasecmp(atom + 3, "nect")) + return CONNECT; + break; + } + break; + } + if (!strcasecmp(atom + 1, "reate")) + return TOKEN_CREATE; + break; case 'd': if (!strcasecmp(atom + 1, "b-time-format")) return DB_TIME_FORMAT; diff --git a/includes/dhctoken.h b/includes/dhctoken.h index 89df27b0..66b9d773 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h @@ -325,7 +325,8 @@ enum dhcp_token { MIN_BALANCE = 629, DOMAIN_LIST = 630, LEASEQUERY = 631, - EXECUTE = 632 + EXECUTE = 632, + CONFLICT_DONE = 660 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \ diff --git a/server/confpars.c b/server/confpars.c index 995eeae9..134d6b6c 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: confpars.c,v 1.159.16.10 2008/01/22 19:02:51 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n"; +"$Id: confpars.c,v 1.159.16.11 2009/06/17 21:50:03 dhankins Exp $ Copyright (c) 2004-2008 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1219,6 +1219,10 @@ void parse_failover_state (cfile, state, stos) state_in = communications_interrupted; break; + case CONFLICT_DONE: + state_in = conflict_done; + break; + case RESOLUTION_INTERRUPTED: state_in = resolution_interrupted; break; |