Skip to content

fix(protocols): rebuilding a frame cut at the extension-chain bound warns more than once #1619

Closed

Description

@JarryShaw

The ruling on #1604 was to warn once on reaching the 32-header extension-chain bound. Parsing a cut frame does warn once, but rebuilding it with Ethernet.from_data(frame.info.to_dict()) warns several times.

Repro on #1608's head (254034005). Each frame is Ethernet, then n Hop-by-Hop headers, then TCP. The counts are ProtocolWarnings naming the limit:

Carrier n parse rebuild
IPv6 32 0 0
IPv6 33 1 2
IPv6 1,000 1 2
IPv4 (protocol 0) 33 1 2
IPv4 (protocol 0) 100 1 34
IPv4 (protocol 0) 1,000 1 34

Cause: reported by the #1610 worker and not yet confirmed by me. Internet._next_layer_class (pcapkit/protocols/internet/internet.py) restarts the chain depth at 0 for each rebuilt header, so each nested re-parse counts its own chain afresh.

Expected: rebuilding a cut frame warns no more than parsing it does. The #1610 work makes the 64-layer frame bound behave this way by marking the rebuild in _make_payload.

Blocked until #1608 and the #1610 PR merge, because both edit the files the fix needs.

Activity

  1. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until #1608 and the #1610 PR merge: they edit pcapkit/protocols/internet/internet.py and pcapkit/protocols/protocol.py.

  2. 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 10, 2026
  3. moved this to Blocked in PyPCAPKiton Oct 10, 2026
  4. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    #1608 has merged. Still blocked until #1620 (the #1610 PR) merges, since it edits pcapkit/protocols/protocol.py.

  5. 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 12, 2026
  6. JarryShaw commented on Oct 12, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1620 merged. A worker is on it.

  7. moved this from Blocked to WIP in PyPCAPKiton Oct 12, 2026
  8. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 13, 2026
  9. added this to the PyPCAPKit v1.5 milestone on Oct 26, 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