Repository navigation
Conversation
|
NEEDS CHANGES (cross-review, different model from the author). Required: (1) the 8 const/vendor pairs are hand-typed literals that have drifted from live IANA — several real assigned values (e.g. ICMPv6 Extended Echo 160/161, RFC 8335; several Destination Unreachable/Parameter Problem codes) come back Verified correct: real-packet (scapy, valid checksums) round-trips for both protocols across 17 message types including every error type, all byte-exact; dispatch wiring (proto 1→ICMP, 58→ICMPv6, HOPOPT passthrough); shared Non-blocking: doc says "three fields" lists four; a false claim that Raw is the only protocol with no |
|
Coverage: 94.06% (unit tier, Python 3.15,
Per-file detail: the |
312b55c to
b627627
Compare
|
All five required fixes applied and verified directly (new head One operational note: I discovered mid-review that the ORIGINAL worker agent was still running in this same worktree 3+ hours after opening the PR, concurrently with the fix-relay I'd dispatched — a real collision the relay detected and reconciled (kept two beneficial concurrent edits, discarded one cosmetic one). I've stopped the stray worker; the pushed state is independently verified clean. Cross-review dispatched. |
|
NEEDS CHANGES (cross-review round 2, different model from the author). Checksum arithmetic itself is correct (8 ICMP message kinds and 7+ ICMPv6 paths independently verified against scapy and an RFC 1071 reference loop). But the verification logic produces false "invalid checksum" warnings on VALID traffic in three real situations, and silently drops ICMPv6-over-IPv4 to Raw entirely: Required: (1) false positives on valid packets — the first fragment of a fragmented ICMP/ICMPv6 message warns (checksum covers the whole reassembled message, only the first fragment gets summed; large pings and PMTU probes hit this constantly), a truncated/short-snaplen capture warns on every echo, and an IPv6 Routing header with Segments Left > 0 warns because the pseudo-header should use the FINAL destination per RFC 8200 §8.1 (which the PR itself cites) but uses the IPv6 header's immediate Minor: Everything else — IANA registry accuracy, |
b627627 to
27f1794
Compare
|
All required fixes applied and verified directly (new head |
|
NEEDS CHANGES (cross-review round 3, different model from the author) — round 2's three bugs (fragmentation false-positive, ICMPv6-over-IPv4 crash, fold-loop arithmetic) are all genuinely fixed, confirmed by exhaustive re-derivation (26 inputs across the fold boundary, 3-fragment dispatch trace confirming middle/last fragments never even reach ICMP's Two new edge cases found, both in the same checksum-skip logic: Required: (1) Mobile IPv6 Home Address option (RFC 6275 §11.3.1) gives a false "invalid checksum" warning — a real ICMPv6 sender using Mobile IPv6 computes the checksum using the home address as the pseudo-header source, but the wire source is the care-of address; since pcapkit already parses this option ( Non-blocking: Relaying the two required fixes. |
27f1794 to
de614f6
Compare
|
Both required fixes applied and verified directly (new head |
|
NEEDS CHANGES (Sonnet,
|
|
Verified ( |
|
GOOD TO GO (Sonnet, |
|
Reads like there's an overlap in the ICMPv4 and ICMPv6's implementation? Can we move some of those to the base ICMP class? |
|
I think there're similar/duplicate that can be extracted from |
|
My reading of your 03:42Z comment: move the duplicated ICMPv4/ICMPv6 code into the |
|
Also, seems like we need to add registry method for the |
|
cross reference #2444 for the convention rulings. |
|
My reading: add a |
|
Held: Actions queue at 47 (above the hold line). The shared |
|
Also for the held rework (review of |
|
Correction to my reading: add a wrapper method in |
|
NEEDS CHANGES (Sonnet,
|
|
Correction, you were right: keep |
|
Member order is in scope for this rework. Group the class body as: properties, public methods ( |
|
My reading of your comment: |
|
Rebased onto main after #2443/#2491 landed, new head |
|
Rebased onto main after #2497 (ARPHRD crawler) landed, new head |
|
Applied the rework ruled on at
Tests: narrow ICMP suite 44 passed / 32 subtests ( |
|
Cross-review (Sonnet) at |
|
Cross-review (Sonnet) at |
Closes #2436. - ICMP: abstract base for the family, as IP is for IPv4/IPv6; id() is ('ICMP', 'ICMPv6'). Carries only the id() composition -- no shared method body. - ICMPv4 (RFC 792): own read/make, register_type, and all five message bodies (Echo, Destination Unreachable, Time Exceeded, Parameter Problem, raw fallback). id() is ('ICMP',). - ICMPv6 (RFC 4443): own read/make, register_type, and its six message bodies (adds Packet Too Big). id() is ('ICMPv6',). - Bind TransType 1 to ICMPv4 and 58 to ICMPv6; export all three. - Add register_icmp_type to pcapkit.foundation.registry, routing a code to whichever class's own register_type owns its enum. - Add IANA const/vendor registries for ICMP/ICMPv6 types and codes. - The checksum is parsed and rebuilt as-is, never verified or computed (#2470). - Docs pages; tests for round trips, selectors on parsed frames, and registry routing.
ICMP and ICMPv6 each add 4 const modules (type + 3 *_code modules), 8 total, but the pin bumps across the 4 census test files were only +7. Bumped the remaining +1 everywhere: ints 124->125, enums 140->141, distinct modules 134->135 (test_const_enum_builtin_parity); enums 130->131, covered 127->128 (test_const_enum_get); enums 124->125 (test_const_enum_lookup); all_files 134->135, generated 117->118 (test_const_registry_protocol). Verified: tests/const/ and tests/vendor/ pass clean (580 tests, 27053 subtests).
Rebase onto
|
| file | assertion | value |
|---|---|---|
test_const_enum_builtin_parity.py |
len(ints) |
126 |
len(flags) |
6 | |
len(strs) |
10 | |
len(self.enums) |
142 | |
len({obj.__module__ ...}) |
136 | |
test_const_enum_get.py |
len(self.enums) |
132 |
covered |
129 | |
test_const_enum_lookup.py |
len(self.enums) |
126 |
test_const_registry_protocol.py |
len(all_files) |
136 |
len(generated) |
119 | |
test_dispatch_registry_unit.py |
len(cases) |
56 |
by_family['internet'] |
20 |
Tests (on the final amended head, PYTHONSAFEPATH unset — see below)
tests/const/: 390 passed, 24850 subtests passedtests/vendor/: 190 passed, 2268 subtests passed- Narrow ICMP/IGMP/dispatch (
test_icmpv4_roundtrip_unit,test_icmpv6_roundtrip_unit,
test_icmp_selector_runtime,test_icmp_type_registrar_unit,test_igmp_unit,
test_dispatch_registry_unit): 91 passed, 230 subtests passed tests/project/: 2132 passed, 80 skipped, 0 failed, 10687 subtests passed
One red herring worth recording: an initial tests/project/ run showed 234 unrelated
failures (CI workflow-script tests — benchmark matrix, apt cache, python-versions,
superseded-run reporting). Root cause was not this rebase or host contention — it was
my own PYTHONSAFEPATH=1, used to confirm which tree pcapkit resolved into, leaking
through os.environ into the subprocess calls those tests make to util/*.py scripts,
which broke those scripts' own sys.path setup. Confirmed by re-running one failing test
with PYTHONSAFEPATH unset (passed), then the full suite (clean, 0 failed).
git merge-tree --write-tree HEAD origin/main confirms a clean tree with no conflicts.
One commit per package, two commits total (the original feat(internet) + fix(tests)
pair), force-pushed with --force-with-lease. No content changed beyond the conflict
resolution and the pin values above — this was a rebase, not a content review, so the
review: good-to-go label is left as-is pending a confirming pass given the pin-test
content did change.
|
Cross-review (Sonnet) at |
Please follow the guide below
make pylint,make mypy,make isort): isort and mypy clean on changed files; full pylint not runmake testpasses, and a test case covers the change: targeted unit tests only, full suite not rundocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible: N/A, centralised in chore(docs): centralize 1.6.0 changelog updates in one place, not per-feature-PR #2449What is the purpose of your pull request?
feat: adds a featureDescription of your pull request and other information
Implements ICMP (RFC 792) and ICMPv6 (RFC 4443) under an abstract
ICMPbase, whoseid()is('ICMP', 'ICMPv6').ICMPv4andICMPv6share the Echo, Destination Unreachable and Time Exceeded bodies in the base; ICMPv6 adds Packet Too Big. Unknown types stay raw.Checksums are kept as-is, never verified or computed (#2470); Neighbor Discovery and MLD stay raw.
register_icmp_typeis the registry wrapper.Tests: byte-exact round trips, selector tests on parsed frames, and registry routing.
Closes #2436