ip_frag: Drop IPv6 packets larger than MTU

Drop larger packets if ipv6-fragmentation is disabled

Picked from: espressif/esp-lwip@5b2072eb
Ref IDF-4846
This commit is contained in:
xueyunfei
2022-03-31 09:44:55 +02:00
committed by David Cermak
parent 12bcb04885
commit 6c65a09e0c
+2
View File
@@ -1263,6 +1263,8 @@ ip6_output_if_src(struct pbuf *p, const ip6_addr_t *src, const ip6_addr_t *dest,
if (netif_mtu6(netif) && (p->tot_len > nd6_get_destination_mtu(dest, netif))) {
return ip6_frag(p, netif, dest);
}
#else
LWIP_ERROR("ip6_output_if: Packet larger than MTU discarded", !(netif->mtu && p->tot_len > netif->mtu), return ERR_IF;);
#endif /* LWIP_IPV6_FRAG */
LWIP_DEBUGF(IP6_DEBUG, ("netif->output_ip6()\n"));