Skip to content

fix(ipv4,tcp): a header length declared past the data zero-fills the missing octets on rebuild #1404

Closed

Description

@JarryShaw

Describe the bug
When an IPv4 ihl or a TCP data offset declares more header than the captured data holds, and the option area starts at or past the end, the missing octets are zero-filled. The rebuilt frame is longer than the captured one. This is a declared header length, separate from #1325's option lengths; #1398 pins the end-of-options case deliberately (test_an_option_area_declared_past_the_data_still_ends_at_eool) but asserts no round trip.

To Reproduce

Expected behavior
Byte-exact, per the every-round-trip ruling: keep the short header as captured (Raw inside the parent), as #1325 does for options.

Found by the #1398 cross-review. Blocked until #1398 merges, which touches the same option-area code.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 8, 2026
  2. moved this to Blocked in PyPCAPKiton Oct 8, 2026
  3. JarryShaw commented on Oct 8, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1398 and #1399 have merged. One worker is taking #1402 and #1404 together, because both edit protocols/internet/ipv4.py.

  4. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 8, 2026
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 8, 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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions