Skip to content

Commit

Permalink
ip_frag: Drop IPv6 packets larger than MTU
Browse files Browse the repository at this point in the history
Drop larger packets if ipv6-fragmentation is disabled

Picked from: 5b2072eb
Ref IDF-4846
  • Loading branch information
freakyxue authored and david-cermak committed Aug 16, 2022
1 parent c35e4d3 commit 70d46d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/ipv6/ip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit 70d46d2

Please sign in to comment.