Skip to content

fix(hip): from_data raises AttributeError, alias reads _info before it is set #1184

Closed

Description

@JarryShaw

Describe the bug
HIP.from_data(info) raises AttributeError: 'HIP' object has no attribute '_info'. The alias property (pcapkit/protocols/internet/hip.py:475) reads self._info.version before _info is set, and _decode_next_layer (internet.py:236) reaches it during the rebuild.

To Reproduce
Parse frame #99 of options-internet.pcap, take its HIP layer's info, and call HIP.from_data on it. This reproduces on origin/main (20438e3ec).

Impact
Once #1182 lands, IPv6.from_data rebuilds the extension chain by calling each header's from_data. The 48–49 IPv6>HIP capture frames then raise this error 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. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 7, 2026
  5. 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