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(protocol): a raw-bytes or Schema item in a make() list crashes construction #1312
Describe the bug Protocol.__init__ stores the made schema in __header__ (protocol.py:573) and unpack then reuses it instead of re-parsing (protocol.py:593-596), so read receives items still as bytes/Schema. The bytes/Schema items that _make_hip_param, _make_ipv4_options and _make_mh_options accept are not readable by read.
To Reproduce
HIP(extension=True, parameters=[b'\x00\x41\x00\x08' + bytes(8)]): AttributeError: 'bytes' object has no attribute 'type' at hip.py:786
IPv4(options=[b'\x94\x04\x00\x00'], protocol=253): same error at ipv4.py:621
MH(data={'options': [b'\x01\x02\x00\x00']}): same at mh.py:2824
bare MH(): 'bytes' object has no attribute 'options' at mh.py:1678 (the default is data=b'\x00\x00', mh.py:1448)
Expected behavior
Items the makers accept build a packet, and a bare MH() constructs. Either re-parse the packed header in unpack or have read accept the made schema.
Found by the internet-v4 round-trip audit (#1202); reproduced on main at 11ae68ebf (repro check D1).
Found by the internet-v4 round-trip audit (#1202). The repro was re-checked by an independent verifier, and I re-ran it on main at 11ae68ebf.
Activity
JarryShaw commentedon Oct 7, 2026
Unblocked: #1227 merged at 19:06Z, so the file conflict is gone. Back to
pendinguntil a worker picks it up.fix(protocol): raw items in a make() list build a packet; str enum na…
fix(protocol): raw items in a make() list build a packet; str enum na…
fix(pcapng): build a Decryption Secrets Block from bytes secrets_data (…