Repository navigation
refactor(toolkit): revert scapy's agreement-only code (#1708) - #1724
Merged
Merged
Conversation
Owner
Author
|
Verdict: GOOD TO GO at
|
Owner
Author
|
Heads-up: this conflicts with #1721 (pypcapfile) in |
Third-party engines are best effort (#1687), so the scapy code that exists only to match the default engine comes out: - revert #1683, #1663, #1652 and #1631, and the scapy hunks of #1614: the link-type and loopback-family walk, the frame and extension-header bounds, the IPv6 chain walk over the octets, the stops at GRE, VXLAN, PPPoE and the other layers the default engine leaves raw and at ICMP quotes, and the IPv4 header checks - keep #1624's walk (TCP behind AH or an IPv6 extension header in IPv4, and the later-fragment stop), #1605's keying by the carrying IP header and #1589's trailer cut; the walk calls _walk_extension_headers, which the pypcapfile revert keeps - re-land as guards: a zero-length frame is no IPv4 input and has no packet2dict octets (#1676); IPv4 in IPv6 ends at the Payload Length (#1623); a packet built by hand is read off its octets (#1676); ipv6_reassembly takes only its own IPv6 layer's Fragment header, and none in a later IPv4 fragment - delete the four scapy agreement modules and test_scapy_unit's default-engine checks; the guards' tests assert constants - docs: scapy applies the extension-header bound only behind IPv4 and the frame-layer bound nowhere, and its silent gaps are listed where gaps are said to be announced The scapy toolkit and engine modules, the shared modules that run scapy, and the project and tier guards pass on 3.14 (scapy 2.7.0) and 3.11 (scapy 2.8.0).
JarryShaw
force-pushed
the
refactor/1708-scapy-revert-agreement
branch
from
October 14, 2026 14:55
6f1feb5 to
53bf23e
Compare
Owner
Author
|
Rebased onto Verdict: GOOD TO GO at
|
3 of 13 tasks
Contributor
|
Coverage: 89.65% (unit tier, Python 3.15,
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.
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the change. Narrow runs only, listed below.Added a changelog entry under
docs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible: N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
Tick the commit type your subject line carries.
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingrelease— bumps the version or rolls up a distributionchore— anything elseDescription of your pull request and other information
Phase 2 of #1708, for scapy, per the plan on #1687.
_ipv4_accepted,_quoted,_linktype,_network,_ipv6_chain,_dissected,_first_ipv4,_first_ipv6andLOOPBACK_FAMILIES, plus four test modules.TypeError, an inner Fragment header handed to IPv6 reassembly in 6in6, and IPv6 read inside a later IPv4 fragment._walk_extension_headers, which refactor(toolkit): revert pypcapfile's agreement-only code (#1708) #1721 keeps, instead of_past_extension_headers, which refactor(toolkit): revert pypcapfile's agreement-only code (#1708) #1721 deletes. The combined tree passes.tests/toolkit(251 passed) andtests/foundation/engines(147 passed) on 3.14 with scapy 2.7.0, and both on 3.11 with scapy 2.8.0 (430 passed). Sphinx gives 63 warnings, unchanged.