RFC3942 reserved the range 224 - 254 for site-specific options. Part of the justification for reducing the range was the problems caused by vendor abuse, which could conflict with site-specific usage. Instead vendors were asked to publish their option usage and to request an official assignment.
Unfortunately the udhcp code still hard codes vendor-specific usage of options 249 and 252. This makes many site-specific use cases impossible. udhcp is flexible enough to allow any use of unknown/undefined options. But all options with a type flag have type specific restrictions. It is, for example, impossible to use values with embedded zero bytes in an OPTION_STRING type. This means that option 252 cannot currently be used for integer or structured data. The WPAD option has been obsolete since the original draft expired in December 1999. The "MS" classless static route option has been obsolete since option 121 was standardized by RFC3442 in 2002. Removing the bogus vendor defintions to align with https://www.iana.org/assignments/bootp-dhcp-parameters/bootp-dhcp-parameters.xhtml#options This restores the full site-specific option range as defined by RFC3942. It does not prevent using option 249 or 252 as previously defined, in the unlikely event that a site depends on the obsolete usage. function old new delta dhcp_optflags 82 78 -4 dhcp_option_strings 301 281 -20 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-24) Total: -24 bytes Signed-off-by: Bjørn Mork <[email protected]> --- examples/udhcp/udhcpd.conf | 3 --- networking/udhcp/common.c | 4 ---- networking/udhcp/common.h | 2 -- testsuite/parse.tests | 1 - 4 files changed, 10 deletions(-) diff --git a/examples/udhcp/udhcpd.conf b/examples/udhcp/udhcpd.conf index 6eb10852e2e6..8c7bddf30a0b 100644 --- a/examples/udhcp/udhcpd.conf +++ b/examples/udhcp/udhcpd.conf @@ -73,7 +73,6 @@ opt wins 192.168.10.10 option dns 129.219.13.81 # appended to above DNS servers for a total of 3 option domain local option lease 864000 # default: 10 days -option msstaticroutes 10.0.0.0/8 10.127.0.1 # single static route option staticroutes 10.0.0.0/8 10.127.0.1, 10.11.12.0/24 10.11.12.1 # Arbitrary option in hex or string form: option 0x08 01020304 # option 8: "cookie server IP addr: 1.2.3.4" @@ -97,7 +96,6 @@ option 14 "dumpfile" #opt bootfile STRING # [0x43] tftp file to download (e.g. kernel image) #opt bootsize NUM # [0x0d] size of that file #opt rootpath STRING # [0x11] (NFS) path to mount as root fs -#opt wpad STRING # [0xfc] Web Proxy Auto Discovery Protocol #opt serverid IP # [0x36] default: server's IP #opt message STRING # [0x38] error message (if set, udhcpd would send it on success too) #opt vlanid NUM # [0x84] 802.1P VLAN ID @@ -118,7 +116,6 @@ option 14 "dumpfile" # Options specifying routes #opt routes IP_PAIR_LIST # [0x21] #opt staticroutes STATIC_ROUTES # [0x79] RFC 3442 classless static route option -#opt msstaticroutes STATIC_ROUTES # [0xf9] same, using MS option number # Obsolete options, no longer supported #opt logsrv IP_LIST # [0x07] 704/UDP log server (not syslog!) #opt namesrv IP_LIST # [0x05] IEN 116 name server, obsolete (August 1979!!!) diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index ad580f38dd9b..b50c198d2a3d 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c @@ -70,8 +70,6 @@ const struct dhcp_optflag dhcp_optflags[] ALIGN2 = { { OPTION_STRING , 0xd2 }, /* DHCP_PXE_PATH_PREFIX */ { OPTION_U32 , 0xd3 }, /* DHCP_REBOOT_TIME */ { OPTION_6RD , 0xd4 }, /* DHCP_6RD */ - { OPTION_STATIC_ROUTES | OPTION_LIST , 0xf9 }, /* DHCP_MS_STATIC_ROUTES */ - { OPTION_STRING , 0xfc }, /* DHCP_WPAD */ /* Options below have no match in dhcp_option_strings[], * are not passed to dhcpc scripts, and cannot be specified @@ -141,8 +139,6 @@ const char dhcp_option_strings[] ALIGN1 = "pxepathprefix" "\0" /* DHCP_PXE_PATH_PREFIX */ "reboottime" "\0" /* DHCP_REBOOT_TIME */ "ip6rd" "\0" /* DHCP_6RD */ - "msstaticroutes" "\0" /* DHCP_MS_STATIC_ROUTES*/ - "wpad" "\0" /* DHCP_WPAD */ ; #endif diff --git a/networking/udhcp/common.h b/networking/udhcp/common.h index 3ef371a7c86f..bb61a4fa233f 100644 --- a/networking/udhcp/common.h +++ b/networking/udhcp/common.h @@ -187,8 +187,6 @@ struct dhcp_scan_state { //#define DHCP_PXE_CONF_FILE 0xd1 /* 209: RFC 5071 Configuration file */ //#define DHCP_PXE_PATH_PREFIX 0xd2 /* 210: RFC 5071 Path prefix */ //#define DHCP_REBOOT_TIME 0xd3 /* 211: RFC 5071 Reboot time */ -//#define DHCP_MS_STATIC_ROUTES 0xf9 /* 249: Microsoft's pre-RFC 3442 code for 0x79? */ -//#define DHCP_WPAD 0xfc /* 252: MSIE's Web Proxy Autodiscovery Protocol */ #define DHCP_END 0xff /* 255: */ /* Offsets in option byte sequence */ diff --git a/testsuite/parse.tests b/testsuite/parse.tests index 2cbed6f31170..a34f2a4f2d86 100755 --- a/testsuite/parse.tests +++ b/testsuite/parse.tests @@ -124,7 +124,6 @@ cat >$FILE.res <<EOF [option][dns][129.219.13.81] [option][domain][local] [option][lease][864000] -[option][msstaticroutes][10.0.0.0/8][10.127.0.1] [option][staticroutes][10.0.0.0/8][10.127.0.1,][10.11.12.0/24][10.11.12.1] [option][0x08][01020304] EOF -- 2.39.5 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
