Repository navigation
fix(foundation): number pcapng blocks across the whole file, not per section (#1256) - #1426
Merged
Merged
Conversation
…section (#1256) - The engine named IDB, NRB, ISB, DSB, systemd Journal Export, Custom and Unknown blocks by the length of the current section's context list, which restarts at every SHB. A second section's first IDB was named "Interface Description 1" again, so JSON/plist kept one of the two blocks and files=True overwrote a file. Each kind now takes its number from a file-wide counter; a single-section file is named as before. - tests/foundation/test_pcapng_unique_block_names_unit.py extracts a two-section capture holding every named kind in both sections.
Owner
Author
|
Verdict: GOOD TO GO at
|
Contributor
|
Coverage: 89.45% (unit tier, Python 3.14,
Per-file detail: the |
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)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Closes #1256.
foundation/engines/pcapng.pynumbered IDB, NRB, ISB, DSB, systemd Journal Export, Custom and Unknown blocks by the current section's list length, which restarts at every SHB, sotest.pcapngdumpedInterface Description 1twice (14 blocks, 13 unique keys, 13 files). Each kind now takes a file-wide counter (_block_name); Section Header and Frame were already file-wide.test.pcapng: section 2's IDB is nowInterface Description 3; 14 keys, 14 files.dhcp,dhcp_big_endian,dhcp_little_endian,many_interfaces,profile. Only multi-section files change, and only for keys that previously collided, so not marked breaking.tests/foundation/test_pcapng_unique_block_names_unit.pybuilds a two-section capture with every named kind in both sections; it fails onmain(Interface Description 1where2is expected) and passes here.