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(ipv6): a CALIPSO option loses its trailing pad and shrinks its length on rebuild #1403
Describe the bug
A CALIPSO option whose Opt Data Len exceeds 8 + 4×cmpt_len loses its trailing pad on rebuild, and the option length drops with it. The pad is read into a PaddingField sized by calipso_pad_len (pcapkit/protocols/schema/internet/hopopt.py:473, ipv6_opts.py:473). The data class has no field for it, and make never emits it. The RFC 5570 checksum covers that pad.
To Reproduce
HOPOPT.from_data(HOPOPT(raw).info) turns 3b01 070c 00000001 00 05 0000 00000000 into 3b01 0708 00000001 00 05 0000 01020000: the length goes from 12 to 8, and a PadN replaces the pad.
A non-zero pad gives the same output.
Expected behavior
The option length and pad survive byte-exact.
Reproduced on main at 79949ec3d and found by the PaddingField sweep. Related: #1223, #1232.
Activity
fix(ipv6)!: a CALIPSO option loses its trailing pad and shrinks its l…