You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(engines): TCP trace flows disagree between engines on snapped frames and on IPv4 total_length=0 #1518
Unblocked: #1511 has merged. A read-only investigation is starting on the first step: which engine groups the snapped and zeroed-total_length captures correctly, and why the others differ. Fixes follow once the cause is known.
Investigation done, and I re-derived the rows myself. dpkt, scapy and Wireshark (tcp.stream) are right; the default engine is wrong, for two separate reasons.
Capture
default
dpkt / scapy / Wireshark
tcp.pcap
(1,2,6,7) (3,4,5)
same
snapped by 4 octets
(3,5) (6,)
(1,2,6,7) (3,4,5)
IPv4 total_length = 0
(3,4,5)
(1,2,6,7) (3,4,5)
The issue's first row was wrong: (2,6) (3,) (4,5) is the one-direction view with (1,7) left out. That also undoes the "dpkt and scapy merge flows" reading. Every engine follows the documented definition, one flow per endpoint pair (traceflow/tcp.py:50-62).
Activity
JarryShaw commentedon Oct 10, 2026
Unblocked: #1511 has merged. A read-only investigation is starting on the first step: which engine groups the snapped and zeroed-
total_lengthcaptures correctly, and why the others differ. Fixes follow once the cause is known.JarryShaw commentedon Oct 10, 2026
Investigation done, and I re-derived the rows myself. dpkt, scapy and Wireshark (
tcp.stream) are right; the default engine is wrong, for two separate reasons.tcp.pcap(1,2,6,7) (3,4,5)(3,5) (6,)(1,2,6,7) (3,4,5)total_length= 0(3,4,5)(1,2,6,7) (3,4,5)The issue's first row was wrong:
(2,6) (3,) (4,5)is the one-direction view with(1,7)left out. That also undoes the "dpkt and scapy merge flows" reading. Every engine follows the documented definition, one flow per endpoint pair (traceflow/tcp.py:50-62).protocols/transport/tcp.py:518and frames 2, 4 and 7 atcorekit/fields/collections.py:511(a cut Timestamps option). TCP then becomesRaw, andtoolkit/pcap.py:211/toolkit/pcapng.py:217skip the frame. The "IP length mismatch" theory is ruled out: frames 3, 5 and 6 have the same mismatch and are traced. The fix leaves fix(ipv4,tcp): a header length declared past the data zero-fills the missing octets on rebuild #1404 alone: when the IP payload isRawwith protocol TCP and at least 20 captured octets, the trace reads the fixed header. A worker is on it.total_lengthof 0 (TSO) gives a payload length of −20.fix(toolkit): trace and reassemble a TCP segment whose header the sna…
fix(toolkit): trace and reassemble a TCP segment whose header the sna…
fix(toolkit): key tunnelled TCP by the innermost IP header (#1581)
fix(protocols): bound a frame's dissection at 64 layers (#1610)
fix(protocols): bound a frame's dissection at 64 layers (#1610)
fix(protocols): bound a frame's dissection at 64 layers (#1610)
fix(protocols): bound a frame's dissection at 64 layers (#1610) (#1620)