Skip to content

fix(engines): the scapy engine ignores a PCAP-NG interface's if_tsoffset #1549

Closed

Description

@JarryShaw

Describe the bug
The scapy engine ignores a PCAP-NG interface's if_tsoffset (option 14), so its timestamps are short by the offset.

Reproduction
tests/foundation/engines/test_dpkt_pcapng_interfaces_unit._capture() has a second section whose interface carries tsoffset=100. For that section's frame, the default engine gives 1464843750100.1201171875. With #1546's section fix, the PR's author measured 1464843750000.1201171875 from the scapy engine, which is 100 s short.

Expected behavior
Add the interface's if_tsoffset, as the default engine and the dpkt engine (pcapkit/foundation/engines/dpkt.py:166-168) do.

System information
Linux, CPython 3.14.7, scapy 2.7.0, main at 16fbea054.

Additional context
scapy/utils.py 2.7.0 has no tsoffset handling at all, and neither does pcapkit/foundation/engines/scapy.py. The fix belongs where #1546 resets the interface table, so this is blocked until #1546 merges.

Found by the #1546 author.

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

    @JarryShaw
    OwnerAuthor

    Unblocked: #1546 has merged, so the scapy reader now resets its interfaces per section. A worker is fixing #1503, #1517 and #1549 together in one PR, because all three need _reader_type() in pcapkit/foundation/engines/scapy.py.

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