From: Ted Lemon Date: Wed, 20 Oct 1999 20:55:48 +0000 (+0000) Subject: Support allow/deny duplicates. X-Git-Tag: BCTEL_SPECIAL_19991124~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=337b3e5296cb26687b8858064f7c86562641b9d7;p=thirdparty%2Fdhcp.git Support allow/deny duplicates. --- diff --git a/common/conflex.c b/common/conflex.c index 0a0731167..e29793ef5 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.59 1999/10/07 06:35:40 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.60 1999/10/20 20:55:45 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -491,6 +491,8 @@ static enum dhcp_token intern (atom, dfv) break; } } + if (!strcasecmp (atom + 1, "uplicates")) + return DUPLICATES; break; case 'e': if (isascii (atom [1]) && tolower (atom [1]) == 'x') { @@ -503,7 +505,7 @@ static enum dhcp_token intern (atom, dfv) if (!strcasecmp (atom + 2, "pire")) return EXPIRE; } - if (!strcasecmp (atom + 2, "ncode-int")) + if (!strcasecmp (atom + 1, "ncode-int")) return ENCODE_INT; if (!strcasecmp (atom + 1, "thernet")) return ETHERNET; diff --git a/common/parse.c b/common/parse.c index 3676828e1..ba2b6b58b 100644 --- a/common/parse.c +++ b/common/parse.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.49 1999/10/20 19:12:32 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.50 1999/10/20 20:55:44 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -2769,6 +2769,11 @@ int parse_allow_deny (oc, cfile, flag) &server_options [SV_BOOT_UNKNOWN_CLIENTS])); break; + case DUPLICATES: + status = option_cache (oc, (struct data_string *)0, data, + &server_options [SV_DUPLICATES]); + break; + default: parse_warn (cfile, "expecting allow/deny key"); skip_to_semi (cfile); diff --git a/common/tables.c b/common/tables.c index a9eba87e1..f9098fb38 100644 --- a/common/tables.c +++ b/common/tables.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: tables.c,v 1.30 1999/10/19 15:27:27 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: tables.c,v 1.31 1999/10/20 20:55:45 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -853,7 +853,7 @@ struct option server_options [256] = { { "ddns-rev-domainname", "t", &server_universe, 25 }, { "lease-file-name", "t", &server_universe, 26 }, { "pid-file-name", "t", &server_universe, 27 }, - { "option-28", "X", &server_universe, 28 }, + { "duplicates", "f", &server_universe, 28 }, { "option-29", "X", &server_universe, 29 }, { "option-30", "X", &server_universe, 30 }, { "option-31", "X", &server_universe, 31 }, diff --git a/includes/dhctoken.h b/includes/dhctoken.h index 414c83929..667268b1e 100644 --- a/includes/dhctoken.h +++ b/includes/dhctoken.h @@ -198,7 +198,8 @@ enum dhcp_token { INFINITE = 416, DELETED = 417, UPDATED_DNS_RR = 418, - DNS_DELETE = 419 + DNS_DELETE = 419, + DUPLICATES = 420 }; #define is_identifier(x) ((x) >= FIRST_TOKEN && \