]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Support allow/deny duplicates.
authorTed Lemon <source@isc.org>
Wed, 20 Oct 1999 20:55:48 +0000 (20:55 +0000)
committerTed Lemon <source@isc.org>
Wed, 20 Oct 1999 20:55:48 +0000 (20:55 +0000)
common/conflex.c
common/parse.c
common/tables.c
includes/dhctoken.h

index 0a0731167fc799d3200e401426c86562f2c7b256..e29793ef5ea5147d53c6de37c96998eba9826da2 100644 (file)
@@ -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;
index 3676828e1a574c5670e9ab544d32fd4666c2b82f..ba2b6b58b2032f5b1200763bc6b4f227893c0270 100644 (file)
@@ -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);
index a9eba87e187e11036431f5d447700eb24a621b66..f9098fb383e4f3d86419dff23a47575f5fb33eed 100644 (file)
@@ -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 },
index 414c839290dfc31f7891de605a9a4289c3eff665..667268b1ed905942acffde29f4bc2be572d52cef 100644 (file)
@@ -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 &&  \