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(schema): Schema.pack drops the end-of-options padding length, so TCP and IPv4 rebuild shorter than their header says #1289
Describe the bug
Nothing on the pack path sets __option_padding__, so PaddingField(length=lambda pkt: pkt.get("__option_padding__", 0)) resolves to 0 (schema.py:822-824 packs bytes(field.length); fields at schema/transport/tcp.py:1148, schema/internet/ipv4.py:716, and the pcapng option padding in schema/misc/pcapng.py, e.g. :917). Only the length is covered here; the padding octet values are #1223, and the unpack-side padding handling in #1229 is a different path.
To Reproduce
Rebuild with TCP.from_schema(tcp.schema.to_dict()):
tcp.pcap frame 1: 44 -> 43 octets (...04020000 -> ...040200), Data Offset still 11.
many_interfaces.pcapng frames 24 and 52: the same 44 -> 43.
Activity
JarryShaw commentedon Oct 7, 2026
Blocked until the core schema PR for #1274/#1275/#1265/#1285 merges, because both edit
protocols/schema/schema.py.JarryShaw commentedon Oct 7, 2026
Unblocked: #1331 merged at 20:41Z. Back to
pending.fix(schema): Schema.pack keeps option padding, SchemaField spans and …
fix(schema): Schema.pack keeps option padding, SchemaField spans and …