Skip to content

fix(ospf): from_data(info.to_dict()) raises for cryptographic authentication #1464

Closed

Description

@JarryShaw

Bug. An OSPF packet with cryptographic authentication (AuType 2) does not rebuild from its dict form. from_data(info.to_dict()) raises instead of rebuilding.

Repro on main, and on #1460's head 325c6715b:

hdr = struct.pack('!BBHIIHH', 2, 1, 24, 0x01010101, 0, 0, 2) + struct.pack('!HBBI', 0, 1, 16, 7)
raw = hdr + b'\xaa'*16
o = OSPF(raw, len(raw))
OSPF.from_data(o.info).data == raw          # True
OSPF.from_data(o.info.to_dict())            # ProtocolError: OSPF: invalid type for auth_data: {...}

to_dict() flattens auth_data (a CryptographicAuthentication info) into a plain dict, and _make_data only accepts the info object. This is the same family as #1447: #1452 fixed payload dispatch, not nested data models.

Found by the #1460 cross-review.

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 9, 2026
  2. moved this to Pending in PyPCAPKiton Oct 9, 2026
  3. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until #1460 merges. #1460 changes ospf.py and its schema and data files, which is where this fix also goes. A worker starts from main once #1460 is in.

  4. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 9, 2026
  5. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    Unblocked: #1460 merged as f0230afde. Back to pending; a worker starts from main.

  6. added
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 9, 2026
  7. JarryShaw commented on Oct 9, 2026

    @JarryShaw
    OwnerAuthor

    A worker is on it now, on branch fix/1464-ospf-auth-dict. It will also sweep the other protocols for the same nested-model shape.

  8. 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 9, 2026
  9. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 9, 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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions