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(ipv4): TS option maker rejects its own default timestamp=None and prints it without !r #2277
Describe the bug IPv4._make_opt_ts accepts only a list or a dict for timestamp, but its default is None. So a TS option built without timestamps always falls through to the error branch. That branch formats with {timestamp} rather than {timestamp!r} (#2232, #2257), so 'abc' renders as a bare word, and the docstring's Raises: lists only FieldValueError.
Expected behavior timestamp=None builds like [], a Timestamp-only option with counts empty slots. Anything else that is not a list or a dict raises IPv4: [OptNo 68] invalid timestamp value: must be a list or a dict, not 'abc'. Suggested fix: treat None as [] before the type dispatch, use !r, and add ProtocolError to Raises:. test_ipv4_unit asserts assertRaises(ProtocolError) for timestamp=None, so that case flips; no test pins the text.
System information
Linux, CPython 3.14.9, pcapkit 1.5.0b14 at main9d504ead5.
Activity
fix(ipv4): build the TS option from its default timestamp, and print …
fix(ipv4): build the TS option from its default timestamp, and print …