busybox/networking
Russell Senior 1c461df70a udhcpc: ignore zero-length DHCP options
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>
2021-03-16 11:40:19 +01:00
..
libiproute libbb: introduce and use fputs_stdout 2021-02-03 20:52:40 +01:00
ssl_helper
ssl_helper-wolfssl
udhcp udhcpc: ignore zero-length DHCP options 2021-03-16 11:40:19 +01:00
arp.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
arping.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
brctl.c libbb: introduce and use fputs_stdout 2021-02-03 20:52:40 +01:00
Config.src
dnsd.c dnsd: check that we don't read past packet 2021-02-22 15:36:07 +01:00
ether-wake.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
ftpd.c
ftpgetput.c help text: use -P PORT form 2020-12-18 22:51:46 +01:00
hostname.c more --help text tweaks 2020-12-13 19:18:28 +01:00
httpd_helpers.sh
httpd_indexcgi.c httpd_indexcgi.c: use CSS for odd/even rows 2020-07-31 18:14:54 +02:00
httpd_post_upload.cgi
httpd_ssi.c
httpd.c libbb: introduce and use fputs_stdout 2021-02-03 20:52:40 +01:00
ifconfig.c help text tweaks 2020-12-13 19:04:19 +01:00
ifenslave.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
ifplugd.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ifupdown.c help text tweaks 2020-12-18 04:12:51 +01:00
inetd.c libbb: introduce and use xgettimeofday(), do not truncate 64-bit time_t in shells 2020-12-30 23:48:01 +01:00
interface.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ip.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ipcalc.c help text: replace [OPTIONS] with actual options (if not too long) 2020-12-13 22:34:05 +01:00
isrv_identd.c config: update size information 2018-12-28 03:20:17 +01:00
isrv.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
isrv.h
Kbuild.src
nameif.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
nbd-client.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
nc_bloaty.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
nc.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
netstat.c decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 14:58:02 +01:00
nslookup.c nslookup: do not print "No answer" for NODATA replies, closes 13006 2020-12-31 01:39:44 +01:00
ntpd.c ntpd: tweak comments 2021-03-02 19:54:09 +01:00
ntpd.diff
parse_pasv_epsv.c networking: support ftp PASV responses not ending with ')' 2020-07-19 20:59:35 +02:00
ping.c Fix ping build on the FreeBSD 2021-01-04 13:28:28 +01:00
pscan.c help text tweaks, mainly expanding one for route 2020-12-18 23:33:19 +01:00
route.c route: code shrink 2020-12-19 00:07:13 +01:00
slattach.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
ssl_client.c config: update size information 2018-12-28 03:20:17 +01:00
tc.c tc: array address is never NULL 2019-10-25 13:41:31 +02:00
tcpudp_perhost.c
tcpudp_perhost.h
tcpudp.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
telnet.c randomconfig fixes 2020-12-29 16:53:11 +01:00
telnetd.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
telnetd.ctrlSQ.patch
telnetd.IAC_test.sh
tftp.c tftp: fix --help 2020-12-19 00:33:06 +01:00
tls_aes.c tls: code shrink in AES code 2020-12-15 18:47:25 +01:00
tls_aes.h
tls_aesgcm.c suppress a few "unused function" warnings 2019-10-25 13:05:15 +02:00
tls_aesgcm.h
tls_fe.c tls: code shrink 2021-01-01 18:48:38 +01:00
tls_fe.h
tls_pstm_montgomery_reduce.c networking: cc is not a register 2019-05-17 22:56:47 +02:00
tls_pstm_mul_comba.c networking: cc is not a register 2019-05-17 22:56:47 +02:00
tls_pstm_sqr_comba.c networking: cc is not a register 2019-05-17 22:56:47 +02:00
tls_pstm.c tls: pstm code shrink 2019-01-01 15:40:43 +01:00
tls_pstm.h tls: pstm code shrink 2019-01-01 15:40:43 +01:00
tls_rsa.c tls: pstm code shrink 2019-01-01 15:40:43 +01:00
tls_rsa.h
tls_symmetric.h
tls.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
tls.h libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
traceroute.c traceroute: fix option parsing 2021-02-02 13:48:21 +01:00
tunctl.c help text tweaks 2020-12-18 04:12:51 +01:00
vconfig.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
wget.c wget: new option FEATURE_WGET_FTP to enable/disable FTP 2021-03-09 17:45:10 +01:00
whois.c whois: limit total length of response to 32+2 kb 2019-12-03 14:52:17 +01:00
zcip.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00