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(hip): packets whose fixed bits are not as sent are rejected, though RFC 7401 §5.1 says receivers must ignore them #1459
Bug. HIP rejects a packet whose two fixed header bits are not set as the sender should set them, even though RFC 7401 §5.1 says receivers MUST ignore those bits. The rejection happens at pcapkit/protocols/internet/hip.py:569-574.
Repro on main (ca5f6dba1):
raw=bytes([59,4,16,0x20]) +bytes(4) +b'\x11'*16+b'\x22'*16# fixed bit clearHIP(raw, len(raw), extension=True) # ProtocolError: HIP: invalid formatraw=bytes([59,4,0x90,0x21]) +bytes(4) +b'\x11'*16+b'\x22'*16# leading bit setHIP(raw, len(raw), extension=True) # ProtocolError: HIP: invalid format
The same header with the bits set correctly (0x10/0x21) parses and rebuilds exactly.
RFC 7401 §5.1: the two fixed bits are reserved for SHIM6 compatibility. They "MUST be set as shown when sending and MUST be ignored when receiving."
Expected. Parse such a packet, keep both bits in info, and have from_data rebuild them byte-exact.
Activity
JarryShaw commentedon Oct 9, 2026
A worker is on it now, on branch
fix/1459-hip-fixed-bits.test(protocols): edge-case round trips for every layer family (#1202)
test(protocols): edge-case round trips for every layer family (#1202) (…
fix(hip)!: parse and keep the two fixed header bits (#1459) (#1462)
test(roundtrip): drop the edge-case gaps that #1460, #1462 and #1463 …