diff options
Diffstat (limited to 'lib/libstand/bootp.c')
-rw-r--r-- | lib/libstand/bootp.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libstand/bootp.c b/lib/libstand/bootp.c index 1af7bd5..f3bc816 100644 --- a/lib/libstand/bootp.c +++ b/lib/libstand/bootp.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include <sys/types.h> +#include <sys/endian.h> #include <netinet/in.h> #include <netinet/in_systm.h> @@ -393,6 +394,13 @@ vend_rfc1048(cp, len) val = (const char *)cp; strlcpy(hostname, val, sizeof(hostname)); } + if (tag == TAG_INTF_MTU) { + if ((val = getenv("dhcp.interface-mtu")) != NULL) { + intf_mtu = (u_int)strtoul(val, NULL, 0); + } else { + intf_mtu = be16dec(cp); + } + } #ifdef SUPPORT_DHCP if (tag == TAG_DHCP_MSGTYPE) { if(*cp != expected_dhcpmsgtype) |