Skip to content

consomme: ignore ipv6 extension headers#3670

Open
Brian-Perkins wants to merge 3 commits into
microsoft:mainfrom
Brian-Perkins:consomme_ignore_ipv6_extension_headers
Open

consomme: ignore ipv6 extension headers#3670
Brian-Perkins wants to merge 3 commits into
microsoft:mainfrom
Brian-Perkins:consomme_ignore_ipv6_extension_headers

Conversation

@Brian-Perkins

Copy link
Copy Markdown
Contributor

Ignore any Ipv6 extension headers provided by the guest and just parse the payload.

Copilot AI review requested due to automatic review settings June 4, 2026 22:46
@Brian-Perkins Brian-Perkins requested a review from a team as a code owner June 4, 2026 22:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_len when applicable).
  • Added unit tests covering extension-header skipping, length validation, and fragment-header handling.

Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs Outdated
Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs Outdated
Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs Outdated
Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs Outdated
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown

Comment thread vm/devices/net/net_consomme/consomme/src/lib.rs Outdated
Copilot AI review requested due to automatic review settings June 9, 2026 17:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants