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): REG_FAILED reads Failure Type as a lifetime and its Reg Types as failure types #2309
Describe the bug
In RFC 8003 §4.5, REG_FAILED carries a Failure Type octet followed by Reg Type octets, and no lifetime. RegFailedParameter names the first octet lifetime, and _read_param_reg_failed reports it as timedelta(seconds=octet). It also decodes the following octets with RegistrationFailure, which is the Failure Type registry, rather than Registration.
Reproduction HIP(parameters=[(Parameter.REG_FAILED, {'lifetime': 1, 'reg_failed': [1]})], ...) packs 03a8000201010000, which parses back as lifetime=0:00:01, reg_type=(<RegistrationFailure.Registration_type_unavailable: 1>,). Per RFC this is Failure Type 1 (registration type unavailable) for Reg Type 1 (RENDEZVOUS).
Expected behavior
A failure_type: RegistrationFailure and a reg_type: tuple[Registration, ...].
Suggested fix
Rename the schema field and the data attribute, and switch the list's namespace to Registration. The bytes stay unchanged, but the public data model changes, so it needs a ruling.
System information
Linux, CPython 3.14.9, pcapkit 1.5.0b14 at 9d504ead5.
Recommendation: Follow the RFC: replace lifetime with failure_type and keep no alias, in line with the no-re-export ruling for moved names (#1715). Record it as versionchanged on the data class.
Activity
JarryShaw commentedon Oct 26, 2026
take recommendations
JarryShaw commentedon Oct 26, 2026
Ruling noted: taking the recommendation. A fix worker is on it; the PR will reference this issue.
fix(hip)!: read REG_FAILED's Failure Type and Reg Types as RFC 8003 l…
fix(hip)!: read REG_FAILED's Failure Type and Reg Types as RFC 8003 l…