mirror of
https://github.com/espressif/esp-lwip.git
synced 2026-10-02 13:57:37 +00:00
ip_frag: Drop IPv4 packets larger than MTU
Drop larger packets if ipv4-fragmentation is disabled Ref IDF-4846
This commit is contained in:
@@ -1030,6 +1030,8 @@ ip4_output_if_opt_src(struct pbuf *p, const ip4_addr_t *src, const ip4_addr_t *d
|
|||||||
if (netif->mtu && (p->tot_len > netif->mtu)) {
|
if (netif->mtu && (p->tot_len > netif->mtu)) {
|
||||||
return ip4_frag(p, netif, dest);
|
return ip4_frag(p, netif, dest);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
LWIP_ERROR("ip4_output_if: Packet larger than MTU discarded", !(netif->mtu && p->tot_len > netif->mtu), return ERR_IF;);
|
||||||
#endif /* IP_FRAG */
|
#endif /* IP_FRAG */
|
||||||
|
|
||||||
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
|
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));
|
||||||
|
|||||||
Reference in New Issue
Block a user