net: Fix fragment forwarding and IPv6 reassembly keys - #19597
Open
masc2008 wants to merge 2 commits into
Open
Conversation
IPv4 forwarding can fail after a packet has already been identified as a non-initial fragment. Such fragments do not carry the upper-layer header needed to build a useful ICMP error payload. Drop those fragments silently while still allowing unfragmented packets and fragment zero to generate the existing ICMP errors. Signed-off-by: shichunma <masc2008@gmail.com>
IPv6 fragment identification is scoped by source and destination address as well as the Fragment Identification value. Matching only by device and ID can mix independent IPv6 fragmented packets that reuse the same ID. Store IPv6 source and destination addresses in fragment links and reassembly nodes, and use them when matching IPv6 fragments to an existing node. IPv4 keeps the existing device and ID matching behavior. Signed-off-by: shichunma <masc2008@gmail.com>
masc2008
requested review from
hartmannathan,
jerpelea and
pkarashchenko
as code owners
August 2, 2026 02:02
masc2008
marked this pull request as draft
August 2, 2026 02:04
masc2008
marked this pull request as ready for review
August 2, 2026 04:09
| node = (struct ip_fragsnode_s *)entry; | ||
|
|
||
| if (dev == node->dev && curfraglink->ipid <= node->ipid) | ||
| if (dev == node->dev) |
Contributor
There was a problem hiding this comment.
why need this check which is already done in ip_fragin_match
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
Risk without this change
Testing