Skip to content

fix(protocols): small make() defects in TCP raw options, HIP ENCRYPTED and version, and MH CGA parameters #2708

Closed

Description

@JarryShaw

Found while re-reviewing #2692 and confirmed by a Sonnet cross-review. None is introduced by that PR.

  • TCP: TCP(options=[bytes([255, 2])]) raises EnumValueError: 255 is not a valid Option in the raw-bytes branch (Enum_Option.get(schema[0])). The tuple form (255, {}) builds, and a parsed kind 255 comes back as UnassignedOption, so a parsed option does not rebuild through the raw-bytes path.
  • HIP ENCRYPTED: given an IV with a cipher that takes none (NULL_ENCRYPT, RESERVED_0, RESERVED_3), it counts the IV in its length while pack() drops it. The packet then fails to re-parse ("runs past the end of the data"). It should refuse the IV.
  • HIP version: HIP(next=59, parameters=[]) builds version 6 (3b042061) and re-parses as 6, while make() called directly defaults to 2. Version 6 is not a HIP version, so this looks unintended.
  • MH _make_opt_cga_param: its annotation includes dict[str, Any], but a dict raises ProtocolError: unknown CGA parameter format. Either accept it, or drop it from the annotation and document the refusal.

Activity

  1. added this to the PyPCAPKit v1.6 milestone on Nov 3, 2026
  2. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    on Nov 3, 2026
  3. JarryShaw commented on Nov 3, 2026

    @JarryShaw
    OwnerAuthor

    Blocked on #2692, which rewrites the TCP, HIP and MH makers this touches. It starts once that merges, to avoid a conflicting rewrite. blocked.

  4. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Nov 3, 2026
  5. moved this to Blocked in PyPCAPKiton Nov 3, 2026
  6. JarryShaw commented on Nov 3, 2026

    @JarryShaw
    OwnerAuthor

    #2692 has merged, so this is unblocked. A worker is on it now, based on bd82b7632. wip.

  7. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Nov 3, 2026
  8. moved this from Blocked to WIP in PyPCAPKiton Nov 3, 2026
  9. JarryShaw commented on Nov 3, 2026

    @JarryShaw
    OwnerAuthor

    The PR is #2724.

  10. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 3, 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

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions