diff --git a/components/lwip/port/hooks/lwip_default_hooks.c b/components/lwip/port/hooks/lwip_default_hooks.c index 1ec6e75814f..ee5f5332e01 100644 --- a/components/lwip/port/hooks/lwip_default_hooks.c +++ b/components/lwip/port/hooks/lwip_default_hooks.c @@ -234,6 +234,9 @@ void dhcp_parse_extra_opts(struct dhcp *dhcp, uint8_t state, uint8_t option, uin NETIF_FOREACH(netif) { /* find the netif related to this dhcp */ if (dhcp == netif_dhcp_data(netif)) { + if (mtu < 68) { /* RFC 2132 requires MTU >= 68 */ + return; + } if (mtu < netif->mtu) { netif->mtu = mtu; LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE, ("dhcp_parse_extra_opts(): Negotiated netif MTU is %d\n", netif->mtu));