Repository navigation
fix(pcapng)!: PCAP-NG round-trip follow-ups (#1382, #1383, #1384, #1401, #1405, #1406) - #1412
Merged
Merged
Conversation
…, #1405, #1406) - #1382: PacketDirection 0b11 and PacketReception 5-7 resolve to an Unassigned member instead of raising; epb_flags/pack_flags bits 9-11 are named checksum_not_ready, checksum_valid and tcp_segmentation_offloaded, and reserved is now bits 12-23. - #1383: NRB names split one per terminator, so empty names survive; name data that is empty or unterminated keeps the record area as captured. - #1384: an SPB holding more than the snaplen keeps the excess, warns, and rebuilds from its captured_len. - #1401: the four PCAP-NG parser registrars take #1400's identity guard. - #1405: EPB/PB packet data is bounded by the block; the declared captured_len is kept and the block rebuilds as captured. - #1406: a Journal Export binary field past its entry raises, and the entry is kept whole as entry_raw and rebuilt verbatim. BREAKING CHANGE: EPB_FlagsOption and PACK_FlagsOption gain three required fields and reserved shifts to bits 12-23; the journal clamp and the undefined-flags ProtocolError are gone.
Contributor
|
Coverage: 89.41% (unit tier, Python 3.14,
Per-file detail: the |
Owner
Author
|
Cross-review verdict on
Follow-ups: these malformations behave the same on |
This was referenced Oct 8, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
make pylint,make mypy,make isort) — run on the threepcapng.pyfiles; isort clean, no new mypy errors (6 pre-existing)make testpasses, and a test case covers the change — legs below, not the full suitedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A, added centrallyWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
0b11and reception 5–7 become anUnassignedmember, notProtocolError. Bits 9–11 are named (checksum_not_ready,checksum_valid,tcp_segmentation_offloaded);reservedis now bits 12–23.a\0\0→('a', ''). Empty or unterminated name data keeps the record area raw (#1325).captured_len.incumbent == methguard on the four PCAP-NG registrars.captured_lenis kept, 36 → 36.entry_rawand rebuilt verbatim.Breaking:
EPB_FlagsOption/PACK_FlagsOptiongain three required fields andreservedshifts; the journal clamp and the undefined-flags error are gone. Four existing tests pinned old behaviour and are updated.Six new
tests/protocols/misc/test_pcapng_*_unit.pymodules; each fails withorigin/main's sources written back (44, 13, 3, 12, 8, 5 failures incl. subtests, in table order). Legs:protocols --exclude protocols/internet1043 OK,foundation522 OK,tests/integration90 passed,tests/project400 passed.Closes #1382
Closes #1383
Closes #1384
Closes #1401
Closes #1405
Closes #1406