busybox/networking/udhcp
Denys Vlasenko 64d58aa806 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>
2017-03-27 22:41:59 +02:00
..
arpping.c dhcp: merge leases.c and static_leases.c into dhcpd.c 2016-10-04 00:56:58 +02:00
common.c typo in comment 2017-01-29 18:48:58 +01:00
common.h udhcp: use poll() instead of select() 2017-02-16 23:25:44 +01:00
Config.src Big cleanup in config help and description 2017-01-10 14:58:54 +01:00
d6_common.h udhcp6: fix problems found running against dnsmasq 2017-03-27 22:41:59 +02:00
d6_dhcpc.c udhcp6: fix problems found running against dnsmasq 2017-03-27 22:41:59 +02:00
d6_packet.c udhcp: get rid of bb_info_msg() 2016-03-30 18:41:23 +02:00
d6_socket.c udhcp6: read_interface should save link-local ipv6 address 2017-03-27 22:41:59 +02:00
dhcpc.c udhcpc: make sure we do not overflow poll timeout 2017-02-17 19:20:32 +01:00
dhcpc.h udhcpc6: fix port numbers used if !FEATURE_UDHCP_PORT 2013-01-28 15:25:35 +01:00
dhcpd.c udhcp: use poll() instead of select() 2017-02-16 23:25:44 +01:00
dhcpd.h dhcp: merge leases.c and static_leases.c into dhcpd.c 2016-10-04 00:56:58 +02:00
dhcprelay.c Convert all udhcp applets to "new style" applet definitions 2016-11-23 18:54:59 +01:00
domain_codec.c udhcpc: fix a warning in debug code 2016-03-11 00:26:58 +01:00
dumpleases.c make --help texts more uniform 2017-01-21 02:49:58 +01:00
Kbuild.src fix breakage found by mass one-applet builds 2016-12-23 02:42:26 +01:00
packet.c udhcp: get rid of bb_info_msg() 2016-03-30 18:41:23 +02:00
signalpipe.c udhcp: use poll() instead of select() 2017-02-16 23:25:44 +01:00
socket.c udhcp: get rid of bb_info_msg() 2016-03-30 18:41:23 +02:00