Repository navigation
fix(protocols): set NoPayload on terminal AH extension layer - #2486
Conversation
|
NEEDS CHANGES (Sonnet,
|
|
Held: Actions queue at 40 (at the hold line). Fix round dispatches when the queue drops below 40. |
120e155 to
de622ab
Compare
|
NEEDS CHANGES (Sonnet,
|
- AH in extension mode returns before _decode_next_layer, so it never set _next. Protocol.__contains__ reads _next, so 'ESP' in an AH taken from IPv6.extension_headers raised AttributeError. - The layer now holds NoPayload, as read() gives an undecoded layer: the upper layer belongs to the enclosing IPv6 header, so membership walks nothing past AH and returns False. - Tests build the frames in memory: AH membership for non-matching selectors, ESP after AH, ESP extension layer and IPv4 AH are unchanged.
de622ab to
566fd36
Compare
|
Sanity check, this applies to all other IPv6 extension headers when being used as extension headers already? |
|
Yes. The same early-return gap is on the other extension headers: HOPOPT, IPv6_Opts, IPv6_Route, IPv6_Frag, HIP, MH, and the Shim6 generic fallback. That fix is #2488 ( |
|
Coverage: 94.50% (unit tier, Python 3.15,
Per-file detail: the |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changedocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/AWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Closes #2484
AH from
IPv6.extension_headersreturned before_decode_next_layer, so_nextwas unset and'ESP' in ahraisedAttributeError.The extension-mode AH layer now holds
NoPayload: membership is False for non-matching selectors.ah.payloadstill raisesUnsupportedCallin extension mode.Matching selectors, ESP extension layers and IPv4 AH are unchanged. Other extension headers (e.g. HOPOPT) have the same gap and are not changed here.
test_ah_unit.pyandtest_ipv6_ext_unit.py(AH, IPv6-extension, ESP membership): 44 passedexamples/generators/make_samples.pyrunsisort --check -l100 -p pcapkitclean on changed files