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-opts): SMF_DPD H-DPD with an empty hav raises IndexError instead of ProtocolError #1193
Describe the bug _make_opt_smf_dpd reads hav[0] with no length check, so an H-DPD option built with an empty hav raises a bare IndexError rather than ProtocolError. The access is at pcapkit/protocols/internet/hopopt.py:1678 on main; ipv6_opts.py has the same line.
To Reproduce
On origin/main (or the #1192 branch): HOPOPT(next=59, options=[(Option.SMF_DPD, {'mode': SMFDPDMode.H_DPD, 'hav': b''})]) → IndexError: index out of range. IPv6_Opts behaves the same.
Expected behavior
An empty Hash Assist Value is rejected with an in-library ProtocolError naming the option, matching the other SMF_DPD validation errors.
The #1190 worker found this, and the #1192 cross-review reproduced it on both branches. I re-ran it on the #1192 branch.
Activity
JarryShaw commentedon Oct 7, 2026
Blocked until #1192 merges, because both edit
hopopt.pyandipv6_opts.py.JarryShaw commentedon Oct 7, 2026
Unblocked: #1192 merged. A worker is on it now.