consomme: ignore ipv6 extension headers#3670
Open
Brian-Perkins wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the net_consomme user-mode network stack’s IPv6 transmit path to skip certain IPv6 extension headers so Consomme can parse the actual upper-layer payload (TCP/UDP/ICMPv6) instead of treating the extension header as the payload.
Changes:
- Added
ipv6_upper_layer_payload()to walk past supported IPv6 extension headers and return the true upper-layer protocol + payload slice. - Updated IPv6 send/parse logic to use the computed upper-layer payload (and to respect TSO/USO buffer-length semantics while bounding parsing to
payload_lenwhen applicable). - Added unit tests covering extension-header skipping, length validation, and fragment-header handling.
jstarks
reviewed
Jun 8, 2026
| let upper_layer = ipv6_upper_layer_payload(IpProtocol::HopByHop, &payload).unwrap(); | ||
|
|
||
| assert_eq!(upper_layer.next_header, IpProtocol::Tcp); | ||
| assert_eq!(upper_layer.payload, tcp_payload); |
Comment on lines
+643
to
+647
| /// Skips IPv6 Hop-by-Hop, Routing, and Destination Options extension headers | ||
| /// and returns the upper-layer protocol and payload. | ||
| /// | ||
| /// Fragment headers are rejected because Consomme does not support IP | ||
| /// reassembly. |
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.
Ignore any Ipv6 extension headers provided by the guest and just parse the payload.