Skip to content

fix(internet): MH mobility options that do not round-trip after a one-octet change #2684

Closed

Description

@JarryShaw

Found while reviewing #2683 and confirmed by a Sonnet cross-review. Unchanged by that PR. Each case below is a one-octet change to an option inside the BRR in options-internet.pcap (offsets are within the option), and each breaks the owner's rule that a parse→rebuild round trip matches byte for byte:

  • Length 0 rewritten: MN-ID (8) with Option Length 0 rebuilds 0x11. LMA-Controlled MAG Parameters (62) and Access Network Identifier (52) with a sub-option length of 0 rebuild 0x06 and 0x0d.
  • Parse accepts, rebuild refuses: a prefix length out of range parses, then raises invalid prefix length on rebuild. Affected: IPv4 Address Acknowledgement (30), IPv4 Home Address Request (36), IPv4 Home Address Reply (37) and Delegated MNP (55).
  • Service Selection (20): non-UTF-8 text grows the message from 16 to 24 octets on rebuild.
  • Quality of Service (58): a bit set at offset 3 is dropped.
  • CGA Parameters (12): changing offset 28 rebuilds 56 octets as 168, and changing offset 34 rebuilds them as 48.
  • Option type changed: option 13 retyped as 12 rebuilds 16 octets as 40. Option 42 retyped as 0 rebuilds a different octet.

Repro scripts are in the review's scratch tree, /tmp/2669r/scripts/c6_side.py. Each reader should keep the octets it was given (or refuse, where the RFC says to discard), so the rebuild writes them back. Fixes per #2669's pattern and the short-read convention.

Activity

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

    @JarryShaw
    OwnerAuthor

    A worker is on it now. Moved to wip.

  5. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Nov 2, 2026
  6. moved this from Pending to WIP in PyPCAPKiton Nov 2, 2026
  7. JarryShaw commented on Nov 2, 2026

    @JarryShaw
    OwnerAuthor

    The PR is #2700. A Sonnet review is running.

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