Repository navigation
feat(internet)!: dissect Neighbor Discovery in ICMPv6 (#2934) - #3142
Conversation
|
This needs your decision: where DNS's name codec should live. To decode RFC 8106's DNS Search List option, this PR moves
I've gone ahead with (A): the title now has |
1b6ee7c to
be1c32b
Compare
Documentation build overview
136 files changed ·
|
|
Review verdict: needs changes at
Confirmed:
The fix goes to the original worker, and CI on this head is cancelled. The codec decision above stays open. |
be1c32b to
e988aa5
Compare
|
Re-review verdict: good to go at
The codec decision above is still open. Merging this takes option (A). |
|
Coverage: 94.78% (unit tier, Python 3.15,
Per-file detail: the |
|
Ready to merge at |
|
Take recommendations |
|
Taking the recommendation: option (A). DNS's name codec moves to |
|
maybe rename |
|
This needs your decision: the module name
I'm keeping (A), so the PR stays as it is. If you pick (B), it's a rename plus the |
|
im considering (B) and rename others who should follow this convention. |
|
Taking (B). This PR now names the modules |
ICMPv6 decoded MLD but kept Neighbor Discovery, types 133 to 137 (RFC 4861 section 4), and their options as raw message bodies. * Decode the five messages and, through a new ICMPv6.__option__ map with register_icmpv6_option and the icmpv6-nd-option family, the options of RFC 4861 section 4.6, RFC 4191, 8106, 5175, 8910, 8781, 6275 and 3971. Any other option keeps its octets. * Crawl IANA's ND option registry into NDOption, and RFC 4191's preference values into RouterPreference. * Move DNS's name codec, which the DNSSL option reads too, to pcapkit.corekit.schema.domainname, and POINTER_LIMIT to pcapkit.corekit.const.domainname, with no re-export. Every message and option round-trips byte-exact, whole and cut at every octet; tests/project and the affected protocol suites pass.
e988aa5 to
9b196e2
Compare
|
I checked the delta at |
|
any other modules should be renamed to follow this convention? we can still use joined module names if it's something common, like |
|
Yes, four. |
…ores (#3153) Four corekit modules joined their words, where the ruling in review of #3142 separates them with underscores unless the joined name is a common one. * Rename pcapkit.corekit.schema.shortread to short_read and extlen to ext_len, and pcapkit.corekit.const.ipheader to ip_header and tcpheader to tcp_header, with their docs pages and the ext_len test module. No alias stays at the old paths. * Update every import and reference in pcapkit, tests and docs; the changelogs keep the names they shipped with. * Each module and its page record versionchanged and versionremoved 1.9.0 for its old path, and the moved-module checks of test_no_moved_name_re_exports_1744_unit cover the four. * utilities-or-corekit.rst gains the rule and the names it keeps: byteorder, multidict, infoclass, protochain and traceflow, mirrors of standard-library and third-party modules, protocol packages, and the generated const and vendor modules. Closes #3153 BREAKING CHANGE: pcapkit.corekit.schema.shortread, pcapkit.corekit.schema.extlen, pcapkit.corekit.const.ipheader and pcapkit.corekit.const.tcpheader no longer import; use pcapkit.corekit.schema.short_read, pcapkit.corekit.schema.ext_len, pcapkit.corekit.const.ip_header and pcapkit.corekit.const.tcp_header.
Please follow the guide below
Put an
xinto every box [ ] that applies to your pull request (like this: [x])Use the Preview tab to see how your pull request will look
Searched for similar pull requests
Followed the coding style (
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeDescribed the user-visible change below and left its changelog entry to the maintainer, keeping
docs/source/changelog/andCHANGELOG.mdout of the diff, if the change is user-visible: N/A — centralisedWhat 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 elseAlso tick if it regenerates constant or registry tables, members keeping their numeric values (the
constlabel)Description of your pull request and other information
ICMPv6 decodes Neighbor Discovery types 133–137 (RFC 4861 §4) into their own schemas and data models, with flags as IANA's RA and PIO flag registries assign them.
Their options go through a new
ICMPv6.__option__, withregister_icmpv6_optionand theicmpv6-nd-optionfamily: RFC 4861's five (§4.6), Route Information (RFC 4191), RDNSS and DNSSL (RFC 8106), RA Flags Extension (RFC 5175), Captive-Portal (RFC 8910), PREF64 (RFC 8781), Advertisement Interval and Home Agent Information (RFC 6275), and Nonce (RFC 3971). Every other type keeps its octets. A Length of zero, or one a layout does not fill, is refused.New crawled enums:
NDOption(IANA ND option formats) andRouterPreference(RFC 4191 §2.1).DNSSL reuses DNS's name codec, so
read_name,make_name,name_to_textandtext_to_labelsmove topcapkit.corekit.schema.domain_nameandPOINTER_LIMITtopcapkit.corekit.const.domain_name, with no re-export: the old paths, shipped in 1.7.0 through 1.8.1, carryversionremoved:: 1.9.0.Every message and option round-trips byte-exact, whole and cut at every octet, on its own and behind IPv6.
tests/protocols/internet/test_icmpv6_nd_2934_unit.pyfails on anorigin/developexport.Closes #2934