Repository navigation
fix(ipv6-opts): _make_opt_smf_dpd overwrites the parsed DPD mode, so H-DPD rebuilds as I-DPD - #1192
Merged
Merged
Conversation
…H-DPD rebuilds as I-DPD The parsed DPD mode is now fed through the mode keyword rather than overwritten by it, so an H-DPD option rebuilds as H-DPD. The parsed TaggerID type wins the same way, via a new tid_type keyword, so a 4- or 16-octet DEFAULT Tagger ID no longer rebuilds as IPv4 or IPv6. A Tagger ID that does not fit its type, or is over 16 octets, raises ProtocolError. Same change in HOPOPT and IPv6-Opts. Closes #1190
Contributor
|
Coverage: 88.90% (unit tier, Python 3.14,
Per-file detail: the |
Owner
Author
|
Cross-review verdict on
|
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.
Searched for similar pull requests
Followed the coding style (
mypyandisortclean on both files;pylintadds no new message class)make testpasses, and a test case covers the change — ran the modules listed below, not the full suiteAdded a changelog entry — N/A, added centrally
fix— corrects a defectCloses #1190.
_make_opt_smf_dpd(HOPOPT and IPv6-Opts) now lets the parsed DPD mode win, as #1187 did for the MPLseed_type. The TaggerID type had the same problem: it was inferred from the Tagger ID length, so a 4-octetDEFAULTTagger ID rebuilt as IPv4. It is now taken from the parsed option, or from a newtid_typekeyword. A Tagger ID that does not fit its type, or is over 16 octets, raisesProtocolError.3b000804810203043b00080100010100…0807130a0b0c0d……0807230a0b0c0d…Tests: the new
tests/protocols/internet/test_smf_dpd_mode_rebuild_unit.pypasses 4/4. With the fix reverted, 3 of its tests fail (14 subtests).test_ipv6_extension_unit(61),test_ipv6_extension_runtime,test_mpl_seed_rebuild_unit,test_option_roundtrip_unitandtests/project(389 passed, 1 skipped) all pass.util/run_unittest_leg.py protocols/internetreports 488 tests, 0 failures.