Skip to content

fix(protocols): the default engine does not dissect LINKTYPE_RAW (101) in PCAP and PCAP-NG #1502

Closed

Description

@JarryShaw

Describe the bug
A frame with link type LINKTYPE_RAW (101, raw IP) is left as RAW by the default engine, so its IP datagram is never reassembled. scapy dissects it.

Reproduction
On examples/captures/test.pcapng, frame 2 comes out as RAW. The IPv4 datagrams are [(1,), (4,), (5,)] from the default engine and [(1,), (2,), (4,), (5,)] from scapy. many_interfaces.pcapng gives 34 datagrams versus 36.

Expected behavior
Link type 101 dispatches to IPv4 or IPv6 by the version nibble, and the datagrams match scapy's.

System information
Linux, CPython 3.14.7, main at 00aa1fc90.

Additional context
Not registered in the PCAP frame dispatch (pcapkit/protocols/misc/pcap/frame.py:90), in PCAP-NG (pcapkit/protocols/misc/pcapng.py:699), or in dpkt's mapping (pcapkit/foundation/engines/dpkt.py:401).

Found by the #1202 foundation round-trip slice; reproduced on main.

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 9, 2026
  2. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until the #1202 foundation-slice test PR (branch test/1202-foundation-roundtrips) merges. That PR adds this defect's Gap row, and the fix must delete the row.

  3. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 9, 2026
  4. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    Still blocked, now on #1523 instead of #1508. #1508 has merged, but #1523 edits protocols/misc/pcapng.py, which this fix needs. Unblocks when #1523 merges.

  5. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Unblocking early to meet a deadline. A worker started from main (a3da376dd) on #1502, #1504 and #1558 together, since all three need pcapkit/protocols/misc/pcapng.py. It will rebase over #1523 when that merges, keeping every #1523 hunk.

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

    @JarryShaw
    OwnerAuthor

    The worker split this out of #1573, which now closes #1504 and #1558 only. #1502 stays open, blocked until #1550, #1563 and #1573 have all merged.

  8. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 10, 2026
  9. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1550, #1563 and #1573 have all merged (e9f3340f7). One worker is doing this together with #1574 in a single PR: LINKTYPE_RAW dispatch in the PCAP, PCAP-NG and dpkt tables, plus a BSD loopback layer for LINKTYPE_NULL.

  10. 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 10, 2026
  11. moved this from Blocked to WIP in PyPCAPKiton Oct 10, 2026
  12. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 10, 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