You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(l2tp): L2TPv2.from_data drops the L flag and the Length field #1172
Describe the bug L2TPv2.from_data drops the length-present (L) flag and the Length field, so a header that carries a Length does not round-trip.
To Reproduce
On main748c10dce:
frompcapkit.protocols.link.l2tpv2importL2TPv2raw=bytes.fromhex('c802000c0001000000010002') # ZLB ACK: T, L and S set, length=12L2TPv2.from_data(L2TPv2(raw).info).data.hex() # '88020001000000010002'
The parse reads length=12 with len=True, seq=True. The rebuild clears L (c8 → 88) and omits the 2-octet Length field.
Expected behavior from_data(x.info).data == x.data. That means _make_data should carry the L flag and the length through to make(), as #1166 did for IPv4 and UDP.
Additional context
Found by the #1171 worker and confirmed by its cross-review. I re-ran the reproduction above myself.
Activity