Repository navigation
refactor(link): dispatch LinuxSLL's non-EtherType ARPHRD values through its own registry (#2510) - #2527
Conversation
|
Decisions needed (the conventions do not settle these):
|
|
Cross-review (Sonnet) at Required:
Recommended: drop the count in |
|
drop the count. |
|
Owner: drop the count in |
|
take all your recommendations on Q1-6 |
|
Owner took all six recommendations, paraphrased and reconciled:
The wording fix round requested by the review is still running; it is pushed once queued runs drop below 20. |
|
Fix round at
Q5 (folding |
|
Coverage: 93.95% (unit tier, Python 3.15,
Per-file detail: the |
…gh its own registry (#2510) - LinuxSLL owns __proto__ keyed by ARPHRD (FRAD, IPGRE, IEEE80211_RADIOTAP as Raw, IP6GRE, NETLINK) with __proto_key__ = (ARPHRD, False); it replaces _ARPHRD_NOT_ETHERTYPE and the branch chain, and every other arphrd_type still dispatches protocol_type through Link.__proto__. - LinuxSLL, FRAD and Netlink override register for their own key. - FRAD, GRE and Netlink __index__ return ARPHRD.FRAD, ARPHRD.IPGRE and ARPHRD.NETLINK. - register_arphrd, register_frad and register_netlink wrappers, exported and documented beside register_ethertype; FRAD's and Netlink's take a bare int. Tests: new test_linux_sll_arphrd_registry_unit; registrar sweeps, id/index tests and the __proto_key__ sweep extended. Dispatch is unchanged for every arphrd_type, including under a stop at this layer.
- L2TPv2.__index__: list ARPHRD among the types a non-raising __index__ returns, as FRAD, GRE and Netlink return one. - LinuxSLL.register: state the dispatch of a registered arphrd_type as current behaviour rather than relative to a previous version. - GRE.__index__ and its unit-test docstring: name IP6GRE alongside IPGRE without counting the arphrd_type keys.
…de (#2510) - register_frad and register_netlink call _check_code(code, None, owner), the bare-int check #2521 added, in place of _check_number. - _check_number is deleted; it raised the same messages _check_code does with kind=None. Tests: test_int_only_registrars_reject_anything_but_an_int checks FRAD through _check_code, with the same expected messages.
e2b30f2 to
c271988
Compare
|
Rebased onto
|
|
Re-review (Sonnet) at
|
|
Correction to my reconciliation above: LinuxSLL did not ship in 1.5.1. The v1.5.1 tag has no |
- Added: one's-complement checksum verification and computation (#2543), and the IPX and SCTP registration wrappers (#2521). - Folded into unreleased entries: LinuxSLL/FRAD/Netlink registries (#2527), the IGMP class names (#2542), TLS record chaining and the SSLv2 trial's warnings (#2537), DTLS reassembly via Extractor and toolkit (#2528), and IP_Pseudo's walk at any depth (#2543). ICMP drops its stale checksum line. - Breaking: make() checksums, DRARP's module (#2540), IPv6 overlapping fragments (#2569), TCP_GAP_LIMIT replacing TCP.__window__ (#2579), and Extractor/extract's positional dtls (#2528). - Changed: member order (#2490), conventions (#2542, #2521, #2570), CI -n logical (#2572). Fixed: AppType.get (#2568), trial warnings (#2519, #2577). - CHANGELOG.md regenerated; util/changelog_md.py --check passes.
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 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 elseconst— regenerates constant or registry tables, members keeping their numeric valuesDescription of your pull request and other information
Closes #2510.
LinuxSLLowns a__proto__keyed by ARPHRD, listed in enum-value order: FRAD, IPGRE/IP6GRE → GRE, IEEE80211_RADIOTAP → Radiotap (feat(link): add a radiotap dissector for IEEE80211_RADIOTAP on LinuxSLL #2509), NETLINK. It declares__proto_key__ = (ARPHRD, False). The_ARPHRD_NOT_ETHERTYPEbranch chain is gone; it never shipped.__index__now returns FRAD →ARPHRD.FRAD, GRE →ARPHRD.IPGRE(both keys registered) and Netlink →ARPHRD.NETLINK.LinuxSLL,FRADandNetlinkeach get their ownregisteroverride, andregister_arphrd,register_fradandregister_netlinkjoin the link-layer section offoundation.registry.protocols.Open questions are below; the Sonnet review is in flight.
register_fradandregister_netlinkvalidate with_check_code(code, None, target), and_check_numberis gone (refactor(link): dispatch LinuxSLL's non-EtherType ARPHRD values through its own registry (#2510) #2527 Q5, after feat(registry): foundation.registry wrappers for IPX and SCTP sub-maps; record the convention (#2511) #2521).