Skip to content

fix(toolkit): one undissectable TCP header aborts a whole pyshark extraction #1611

Closed

Description

@JarryShaw

With engine='pyshark', one TCP header that tshark cannot fully dissect aborts the whole extraction with a bare AttributeError. Every other flow in the capture is lost with it.

Repro on main (c43e9318c), Python 3.11, tshark 4.6.9. A capture holds one good flow (SYN, data, FIN) plus one extra frame, and is run with TCP flow tracing on:

Extra frame default pyshark
none 1 flow 1 flow
TCP with data offset 0 1 flow AttributeError (pyshark xml_layer.py:79)
frame cut inside the TCP header 1 flow AttributeError (pyshark xml_layer.py:79)

Expected: pyshark skips the frame that has no usable TCP header, as the default engine does, and traces the rest. The error comes from reading a field tshark did not emit, in tcp_traceflow (pcapkit/toolkit/pyshark.py).

Found by the #1605 cross-review; I reproduced it. Blocked until #1605 merges, because it rewrites tcp_traceflow.

Activity

  1. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until #1605 merges, because it rewrites pcapkit/toolkit/pyshark.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. JarryShaw commented on Oct 10, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1605 merged as d6f627481. One worker is now fixing this together with #1612, since both are in the pyshark engine.

  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 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