Skip to content

fix(link): L2TPv2 drops the reserved flag bits on rebuild #1207

Closed

Description

@JarryShaw

Describe the bug
The flags BitField at schema/link/l2tp.py:45 defines no reserved subfields, and neither does Data_Flags (l2tpv2.py:203) or the flags dict that make builds. Reserved bits 2, 3, 5 and 8-11 are lost.

To Reproduce
Parse 200200010002ff03002145000000 and rebuild it with from_data. The result is 000200010002ff03002145000000. Masks 0x1000, 0x0400 and 0x00f0 behave the same way, including inside UDP on port 1701.

Expected behavior
The reserved bits round-trip unchanged.

Found by the link round-trip audit (#1202) and re-run by me on main at 630f0a581.

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
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