Skip to content

fix(ipv6-opts): _make_opt_mpl calls bit_length() on an IPv6Address seed #1185

Closed

Description

@JarryShaw

Describe the bug
_make_opt_mpl calls seed.bit_length() on the parsed seed_id, which is an IPv6Address for this option. Rebuilding the MPL option raises AttributeError: 'IPv6Address' object has no attribute 'bit_length'. The same code is in two places: pcapkit/protocols/internet/hopopt.py:1878 and pcapkit/protocols/internet/ipv6_opts.py:1867.

To Reproduce
Call from_data on the HOPOPT layer of frame #7 of options-ipv6.pcap, or on the IPv6_Opts layer of frame #20. This reproduces on origin/main (20438e3ec).

Impact
Once #1182 lands, these two capture frames raise the error in IPv6.from_data instead of returning wrong bytes.

Found by the #1182 worker. The #1182 cross-review reproduced it independently.

Activity

  1. added
    fixPull requests that fix a defect (fix: subject prefix)
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  2. JarryShaw commented on Oct 7, 2026

    @JarryShaw
    OwnerAuthor

    A worker is on it now.

  3. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 7, 2026
  4. moved this from Pending to WIP in PyPCAPKiton Oct 7, 2026
  5. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 7, 2026
  6. added this to the PyPCAPKit v1.5 milestone on Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixPull requests that fix a defect (fix: subject prefix)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions