diff options
author | Denys Vlasenko | 2017-03-27 22:22:09 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-03-27 22:41:59 +0200 |
commit | 64d58aa8061c7c848cf0fd37de3ccbb8582d0fc5 (patch) | |
tree | 8ff5d55d0e52a594957036268915c50a7c32a0cb /networking/udhcp/d6_common.h | |
parent | e09f5e3045fc90547be9ec49c63b633d103cfc45 (diff) | |
download | busybox-64d58aa8061c7c848cf0fd37de3ccbb8582d0fc5.zip busybox-64d58aa8061c7c848cf0fd37de3ccbb8582d0fc5.tar.gz |
udhcp6: fix problems found running against dnsmasq
Patch is based on work by tiggerswelt.net. They say:
"
But when we tried to use dnsmasq on server-side, udhcpc6 was unable to
forward the acquired address to its setup-script although the
IPv6-Address had been assigned by the server as we could see via
tcpdump. We traced this issue down to a problem on how udhcpc6 parses
DHCPv6-Options: When moving to next option, a pointer-address is
increased and a length buffer is decreased by the length of the option.
The problem is that it is done in this order:
option += 4 + option[3];
len_m4 -= 4 + option[3];
But this has to be switched as the length is decreased by the length of
the *next* option, not the current one. This affected both - internal
checks if a required option is present and the function to expose
options to the environment of the setup-script.
There was also a bug parsing D6_OPT_STATUS_CODE Options, that made
dnsmasq not work as udhcpc6 thought it is receiving a non-positive
status-code (because it did not parse the status-code as required in RFC
3315).
In addition we introduced basic support for RFC 3646 (OPTION_DNS_SERVERS
and OPTION_DOMAIN_LIST) and RFC 4704 (OPTION_CLIENT_FQDN).
"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/d6_common.h')
-rw-r--r-- | networking/udhcp/d6_common.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/networking/udhcp/d6_common.h b/networking/udhcp/d6_common.h index f7cfa4a..335a092 100644 --- a/networking/udhcp/d6_common.h +++ b/networking/udhcp/d6_common.h @@ -81,9 +81,14 @@ struct d6_option { #define D6_OPT_RECONF_MSG 19 #define D6_OPT_RECONF_ACCEPT 20 +#define D6_OPT_DNS_SERVERS 23 +#define D6_OPT_DOMAIN_LIST 24 + #define D6_OPT_IA_PD 25 #define D6_OPT_IAPREFIX 26 +#define D6_OPT_CLIENT_FQDN 39 + /*** Other shared functions ***/ struct client6_data_t { |