changeset 5219:dc62219c044c draft

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
author Andrew Childs <lorne@cons.org.nz>
date Wed, 13 May 2020 06:08:33 +0900
parents 9553b9896f29
children 29a310159805
files src/dhcp-common.c src/dhcpcd.conf.5.in
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp-common.c	Tue May 12 19:00:36 2020 +0100
+++ b/src/dhcp-common.c	Wed May 13 06:08:33 2020 +0900
@@ -202,8 +202,8 @@
 			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)
--- a/src/dhcpcd.conf.5.in	Tue May 12 19:00:36 2020 +0100
+++ b/src/dhcpcd.conf.5.in	Wed May 13 06:08:33 2020 +0900
@@ -792,7 +792,7 @@
 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
@@ -803,7 +803,7 @@
 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