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): LOCATOR_SET built with spi= raises unless type=1 is also passed #2276
Describe the bug
In HIP._make_param_locator_set, the inner _make_locator sets len=5 when spi is given but leaves type at its default of 0. locator_value_selector accepts only type == 0, len == 4 or type == 1, len == 5, so the public spi= path raises. type=1 without spi fails the same way. Noted in #679 but never tracked.
Expected behavior spi= builds a Locator Type 1 (ESP SPI plus IPv6, RFC 8046 §4) without the caller restating the type.
Suggested fix
Derive type from spi when it is not given (1 with spi, else 0). Raise ProtocolError naming both values, ending with !r, when an explicit type contradicts spi.
System information
Linux, CPython 3.14.9, pcapkit 1.5.0b14 at 9d504ead5.
Related: #2296 rewords _make_locator's other rejection message.
Blocked until the #2309 fix PR merges. That PR reworks the HIP REG_* parameters in hip.py, and this fix edits the same file, so it starts from the merged tree.
Activity
JarryShaw commentedon Oct 26, 2026
Blocked until the #2309 fix PR merges. That PR reworks the HIP REG_* parameters in
hip.py, and this fix edits the same file, so it starts from the merged tree.JarryShaw commentedon Oct 27, 2026
Unblocking — #2309 merged. Open to pick up now.
fix(hip): correct 7 HIP parameter wire defects (#2271, #2275, #2276, #…
fix(hip): correct 7 HIP parameter wire defects (#2400)
fix(protocols): makers name the rejected argument and value in error …
fix(protocols): makers name the rejected argument and value in error …