Skip to content

fix(ipv6): from_data drops the extension-header chain from the rebuild #1177

Closed

Description

@JarryShaw

IPv6.from_data(ipv6.info) drops the extension-header chain. Found during the #1176 cross-review. It reproduces on origin/main and is not caused by #1176.

Repro (at 222dd72a2): an IPv6 header with next header 43 and an 8-octet Routing header is 48 octets on the wire. The rebuild is 40 octets, with the Routing header gone. With a 12-octet extension it is 52 octets on the wire and 44 rebuilt: the 8-octet header is lost and only the trailing Raw survives.

Scope: of the 183 non-exact frames in the capture from_data sweep, up to 134 have an extension header in the chain:

Chain Frames
IPv6>MH 99
HOPOPT 14
IPv6_Opts 14
IPv6_Route 3
UDP>Raw>IPv6_Frag 4

134 is an upper bound, because no frame was isolated to a single cause. The IPv6_Frag frames are probably a separate misparse. The other 49 are IPv6>HIP frames from options-internet.pcap, which this does not explain.

Expected: a rebuild of a parsed IPv6 packet keeps its extension headers, byte for byte.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  2. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    A worker is on it now. It owns ipv6.py and its schema/data modules; ipv6_ext.py stays with #1178.

  3. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  4. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 7, 2026
  5. added this to the PyPCAPKit v1.5 milestone on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions