]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Support iSNS, RFC4174.
authorRoy Marples <roy@marples.name>
Mon, 11 Apr 2016 12:53:53 +0000 (12:53 +0000)
committerRoy Marples <roy@marples.name>
Mon, 11 Apr 2016 12:53:53 +0000 (12:53 +0000)
While here, don't crash if we enter the wrong keyword in dhcpcd-definitions.

dhcp-common.c
dhcpcd-definitions.conf

index c9aff2e29644e805fc6acee7019a99781cdd4d17..eede4be7a32a02362530e2dd49ecd99c538ceff1 100644 (file)
@@ -205,6 +205,8 @@ make_option_mask(const struct dhcp_opt *dopts, size_t dopts_len,
                        continue;
                match = 0;
                for (i = 0, opt = odopts; i < odopts_len; i++, opt++) {
+                       if (opt->var == NULL && opt->option == 0)
+                               continue; /* buggy dhcpcd-definitions.conf */
                        if (strcmp(opt->var, token) == 0)
                                match = 1;
                        else {
index fcd66dd1b158e4495a2daef79afee3186b322ecf..2a4c41a545d646cd7eefb273f13bfa4f03ec499a 100644 (file)
@@ -118,7 +118,20 @@ embed              optional domain         fqdn
 
 # Option 82 is for Relay Agents and DHCP servers
 
-# Options 83 ad 84 are unused, RFC3679
+# iSNS, RFC4174
+define 84      embed                   isns
+embed          uint8_t                 reserved1
+embed          bitflags=00000SAE       functions
+embed          uint8_t                 reserved2
+embed          bitflags=00fFsSCE       dd
+embed          uint8_t                 reserved3
+embed          bitflags=0000DMHE       admin
+embed          uint16_t                reserved4
+embed          uint8_t                 reserved5
+embed          bitflags=0TXPAMSE       server_security
+embed          array ipaddress         servers
+
+# Option 84 are unused, RFC3679
 
 # DHCP Novell Directory Services, RFC2241
 define 85      array ipaddress         nds_servers