From 318512828cf354c38a82b7b1835f0deb1c24bca6 Mon Sep 17 00:00:00 2001 From: xueyunfei Date: Thu, 30 Apr 2020 16:56:47 +0800 Subject: [PATCH] ip_frag: Drop IPv6 packets larger than MTU 2.1.3-esp: 70d46d23 ip_frag: Drop IPv6 packets larger than MTU --- src/core/ipv6/ip6.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index 90e90dda..93fc5752 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -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"));