1c461df70a
Discovered that the DHCP server on a TrendNet router (unknown model) provides a zero-length option 12 (Host Name) in the DHCP ACK message. This has the effect of causing udhcpc to drop the rest of the options, including option 51 (IP Address Lease Time), 3 (Router), and 6 (Domain Name Server), most importantly leaving the OpenWrt device with no default gateway. The TrendNet behavior violates RFC 2132, which in Section 3.14 declares that option 12 has a minimum length of 1 octet. It is perhaps not a cosmic coincidence that I found this behavior on Pi Day. This patch allows zero length options without bailing out, by simply skipping them. function old new delta udhcp_scan_options 183 172 -11 Signed-off-by: Russell Senior <russell@personaltelco.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
||
---|---|---|
.. | ||
arpping.c | ||
common.c | ||
common.h | ||
Config.src | ||
d6_common.h | ||
d6_dhcpc.c | ||
d6_packet.c | ||
d6_socket.c | ||
dhcpc.c | ||
dhcpc.h | ||
dhcpd.c | ||
dhcpd.h | ||
dhcprelay.c | ||
domain_codec.c | ||
dumpleases.c | ||
Kbuild.src | ||
packet.c | ||
signalpipe.c | ||
socket.c |