Repository navigation
fix(ipx): stop dispatching IPX payloads through the IP protocol registry (#2169) - #2187
Merged
Merged
Conversation
…try (#2169) IPX.read handed the IPX Packet Type to the next-layer lookup inherited from Internet, keyed by IP protocol number, so Packet Type 17 parsed as UDP, 4 as IPv4 and 6 as TCP, and Packet Type 0 counted towards EXTENSION_HEADER_LIMIT as a Hop-by-Hop Options header. IPX keeps a __proto__ of its own, keyed by Packet Type and falling back to Raw, as Loopback does for its address family; _next_exthdr_depth returns 0; IPX.protocol is annotated Enum_Packet. Test: test_ipx_next_layer_2169_unit covers the three collisions with a byte-exact rebuild, a registered IPX-native protocol, Packet Type 0 at an extension-header limit of 0, and the annotation.
Owner
Author
|
Review: GOOD TO GO at |
Owner
Author
|
Ready to merge at
|
Contributor
|
Coverage: 91.55% (unit tier, Python 3.15,
Per-file detail: the |
5 tasks done
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.
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectDescription
Closes #2169.
IPXinheritedInternet.__proto__, which is keyed by IP protocol number. Its Packet Type was therefore looked up as one: type 17 parsed as UDP, 4 as IPv4, 6 as TCP. Type 0 also counted towardsEXTENSION_HEADER_LIMITas a Hop-by-Hop header.IPXkeeps its own__proto__, keyed by Packet Type and falling back toRaw, asLoopbackdoes for its address family.IPX.register(Packet.X, …)works through the inheritedregister._next_exthdr_depthreturns 0.IPX.protocolis annotatedEnum_Packet.ipx.rstdocuments__proto__.Rawunless an IPX-native protocol is registered. It used to be mis-dissected as whatever IP protocol shared the number.tests/protocols/internet/test_ipx_next_layer_2169_unit.py. Without the fix it fails 6 tests, e.g.UDP is not Raw.