diff options
| author | Andrew Childs <lorne@cons.org.nz> | 2020-05-13 06:08:33 +0900 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-05-12 22:10:44 +0100 |
| commit | 825221f9a6d56a1c216eb735eb088ccfffc25507 (patch) | |
| tree | 293cb1b82b8ed0d465e00fe71acf4fa6e60daf2b | |
| parent | 632cc0765f7b7536e439912ab403713eb1f2ee0e (diff) | |
| download | dhcpcd-825221f9a6d56a1c216eb735eb088ccfffc25507.tar.xz | |
Fix neighbor discovery option parsing (#16)
* make_option_mask: use `nd_` prefix for nd options
The prefix for neighbor discovery options was partially changed to
`nd6_` in d5700a48edf7006369f766d225e70bbca3d8055c. However
set_option_space continued to use `nd_`. This prevented either
`nd6_prefix_information` or `nd_prefix_information` from being parsed
since the former was in the wrong option space, and the latter did not
have the prefix removed.
* manual: fix nd_ and dhcp6_ option prefixes
| -rw-r--r-- | src/dhcp-common.c | 4 | ||||
| -rw-r--r-- | src/dhcpcd.conf.5.in | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/dhcp-common.c b/src/dhcp-common.c index e26ddd02..cd8e5d72 100644 --- a/src/dhcp-common.c +++ b/src/dhcp-common.c @@ -202,8 +202,8 @@ make_option_mask(const struct dhcp_opt *dopts, size_t dopts_len, continue; if (strncmp(token, "dhcp6_", 6) == 0) token += 6; - if (strncmp(token, "nd6_", 4) == 0) - token += 4; + if (strncmp(token, "nd_", 3) == 0) + token += 3; match = 0; for (i = 0, opt = odopts; i < odopts_len; i++, opt++) { if (opt->var == NULL || opt->option == 0) diff --git a/src/dhcpcd.conf.5.in b/src/dhcpcd.conf.5.in index 6afc8200..53701b5c 100644 --- a/src/dhcpcd.conf.5.in +++ b/src/dhcpcd.conf.5.in @@ -759,7 +759,7 @@ with a name of exported to .Xr dhcpcd-run-hooks 8 , with a prefix of -.Va _nd . +.Va nd_ . .It Ic define6 Ar code Ar type Ar variable Defines the DHCPv6 option .Ar code @@ -770,7 +770,7 @@ with a name of exported to .Xr dhcpcd-run-hooks 8 , with a prefix of -.Va _dhcp6 . +.Va dhcp6_ . .It Ic vendopt Ar code Ar type Ar variable Defines the Vendor-Identifying Vendor Options. The |
