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(tcp): from_data reorders and re-pads TCP options #1151
Describe the bug from_data rebuilds the TCP options of examples/captures/tcp.pcap in a different order and with different padding, so the segment does not round-trip byte for byte.
Expected behavior
Options keep their wire order and padding through from_data.
Blocked until #1135 merges, because it edits pcapkit/protocols/transport/tcp.py.
Additional context
Found by the #1126 worker. Not yet reproduced independently.
Root-cause detail from #1150: TCP._make_tcp_options (tcp.py:2029-2116) drops the original NOP/EOOL octets as "padding" and pads each option to 4 octets separately. Options therefore come back reordered and longer. On http.pcap the data offset goes from a0 to b0, and the IPv4 total length grows by 4.
A sweep found this in http.pcap, many_interfaces.pcapng, test.pcap and tcp.pcap.
Unblocked: #1135 merged at 22:31Z, so tcp.py is free. A worker is on it now; it will reproduce the reorder/re-pad independently first, since this was not yet confirmed.
Activity
JarryShaw commentedon Oct 6, 2026
Root-cause detail from #1150:
TCP._make_tcp_options(tcp.py:2029-2116) drops the original NOP/EOOL octets as "padding" and pads each option to 4 octets separately. Options therefore come back reordered and longer. Onhttp.pcapthe data offset goes froma0tob0, and the IPv4 total length grows by 4.A sweep found this in
http.pcap,many_interfaces.pcapng,test.pcapandtcp.pcap.JarryShaw commentedon Oct 6, 2026
Unblocked: #1135 merged at 22:31Z, so
tcp.pyis free. A worker is on it now; it will reproduce the reorder/re-pad independently first, since this was not yet confirmed.