Skip to content

fix(pcap): building a frame with snaplen 0 writes a record with no packet data #1385

Closed

Description

@JarryShaw

Frame._make_frame_data defaults incl_len to min(len, snaplen). With snaplen 0, incl_len is 0, and #1373's new captured-length slice then drops the packet entirely: a 16-octet record with 0 data octets. main wrote the data behind incl_len=0, which was also an invalid file. PCAP-NG now treats snaplen 0 as no limit (pcapng-06 line 1086). PCAP should either do the same or reject snaplen 0. No fixture covers it.

Confirmed by the #1373/#1378 cross-reviews; present on main too, so not a regression of those PRs. Blocked until #1373 and #1378 merge (same PCAP-NG/PCAP modules).

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

    @JarryShaw
    OwnerAuthor

    Still blocked, now on a different PR. #1378 has merged, but the PCAP-NG half of #1398 (#1325, strict option lengths) is about to edit the same PCAP-NG files. Blocked until #1398 merges.

  3. JarryShaw commented on Oct 8, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1373 and #1378 have merged. A worker is starting on it.

  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