ip_frag: Drop IPv4 packets larger than MTU

2.1.3-esp: 83edc198 ip_frag: Drop IPv4 packets larger than MTU
This commit is contained in:
xiehang
2019-12-30 11:23:03 +08:00
committed by David Cermak
parent 7496451d6c
commit ffe6efe909
+2
View File
@@ -1064,6 +1064,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)) {
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 */
LWIP_DEBUGF(IP_DEBUG, ("ip4_output_if: call netif->output()\n"));