net/ipv6: Forward reassembled fragments through fragout - #19598
Draft
masc2008 wants to merge 1 commit into
Draft
Conversation
NAT66 and IPFILTER may reassemble IPv6 fragments before forwarding so they can inspect the full packet. If the reassembled transit packet is larger than the egress MTU, ipv6_dev_forward() currently drops it before the existing egress ip_fragout() path can split it again. Track packets produced by IPv6 reassembly and allow only those packets to bypass the forwarding MTU drop when CONFIG_NET_IPFRAG is enabled. Normal oversized IPv6 forwarded packets still take the Packet Too Big path. Signed-off-by: shichunma <masc2008@gmail.com>
masc2008
requested review from
acassis,
jerpelea,
pkarashchenko and
xiaoxiang781216
as code owners
August 2, 2026 02:40
masc2008
marked this pull request as draft
August 2, 2026 02:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
NAT66 and IPFILTER may reassemble IPv6 fragments before forwarding so they can inspect the full packet. If the reassembled transit packet is larger than the egress MTU, ipv6_dev_forward() drops it before the existing egress ip_fragout() path can split it again.
Behavior
Normal unfragmented IPv6 packets are still not fragmented by the router. The exception is limited to packets that were already fragmented on ingress and were reassembled inside the stack before forwarding.
Testing
Style/build checks:
git diff --check HEAD~1..HEADmake -C tools -f Makefile.host nxstyletools/nxstyle include/nuttx/net/netdev.htools/nxstyle net/ipforward/ipv6_forward.ctools/nxstyle net/ipfrag/ipv6_frag.ctools/nxstyle net/netdev/netdev_register.cmake -j8withsim:dynconnsFunctional emulator method:
sim:dynconnswith two simulator network devices and IPv6/IPFRAG/IPFILTER enabled.nuttxfrag-a(2001:db8:1::2/64) -> NuttXeth0(2001:db8:1::1/64) -> NuttXeth1(2001:db8:2::1/64) ->nuttxfrag-b(2001:db8:2::2/64).tcpdump.Functional emulator log: