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(pcapng): epb_flags / pack_flags bits are numbered MSB-first, against the spec's LSB numbering #1273
Describe the bug BitField numbers bits MSB-first over the raw octets and ignores byte order (pcapkit/corekit/fields/strings.py:241-258), but the flags namespaces (pcapkit/protocols/schema/misc/pcapng.py:1264-1275, and the pack_flags twin) use the spec's LSB-0 numbering (direction = bits 0-1, FCS length = bits 5-8). Verified against the spec text: "bits are numbered with 0 being the least-significant bit".
To Reproduce
make(direction=INBOUND) -> 02000400 40000000 (want 01000000)
make(fcs_len=4) -> 02000400 02000000 (want 80000000)
wire flags 0x00000001 (LE) parses as direction=UNKNOWN, fcs_len=2
wire flags e5010000 -> ValueError: 3 is not a valid PacketDirection
Expected behavior
Wire 0x1 decodes as inbound; make(direction=INBOUND) writes 0x1.
Found by the misc round-trip audit (#1202). The repro was re-checked by an independent verifier, and I re-ran it on main at 11ae68ebf.
Activity
JarryShaw commentedon Oct 7, 2026
Blocked until the PCAP-NG K1-K5 PR (#1267-#1271) merges.
JarryShaw commentedon Oct 7, 2026
Unblocked: #1339 merged at 20:42Z. Back to
pending.fix(pcapng): blocks and options rebuild as parsed (#1272, #1273, #1277,
fix(pcapng): blocks and options rebuild as parsed (#1272, #1273, #1277,