From: Roy Marples Date: Mon, 11 Apr 2016 12:53:53 +0000 (+0000) Subject: Support iSNS, RFC4174. X-Git-Tag: v6.10.3~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b0e688c32752a0cecb190c5d014cde98f4ccccc;p=thirdparty%2Fdhcpcd.git Support iSNS, RFC4174. While here, don't crash if we enter the wrong keyword in dhcpcd-definitions. --- diff --git a/dhcp-common.c b/dhcp-common.c index c9aff2e2..eede4be7 100644 --- a/dhcp-common.c +++ b/dhcp-common.c @@ -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 { diff --git a/dhcpcd-definitions.conf b/dhcpcd-definitions.conf index fcd66dd1..2a4c41a5 100644 --- a/dhcpcd-definitions.conf +++ b/dhcpcd-definitions.conf @@ -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