Repository navigation
fix(generators): correct stale options.py comments and the code they justified (#1337) - #1427
Merged
Merged
Conversation
…justified (#1337) - ILNP nonce: the width is the ceiling of the bit length in octets, at least one; nonce=0 is one octet and every width 1-16 round-trips. - _httpv2_rebuild: pass the raw flags octet and the reserved bit on, as HTTP._make_data does. Since #1341 make ORs flags in, so withholding it dropped undefined flag bits and the reserved bit on rebuild. - SKIP: TCP EOOL and NOP are no longer dropped by _make_tcp_options (#1163), so they get cases. The rationale now covers only HOPOPT and IPv6-Opts PadN, which list input still collapses onto Pad1. - IPv4 extract comment: the padding drop applies to a fresh option list. New tests/protocols/test_option_generator_1337_unit.py; 9 subtests fail without the fix.
Owner
Author
|
Verdict: GOOD TO GO at
|
Contributor
|
Coverage: 89.46% (unit tier, Python 3.14,
Per-file detail: the |
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 pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix— corrects a defectDescription of your pull request and other information
Closes #1337. Each comment was re-checked with a probe on
a8cc02594.:561):nonce=0is one octet, and widths 1–16 all build and round-trip. Comment now says so._httpv2_rebuild: since fix(httpv2): HTTP/2 frames lose octets on rebuild (#1242-#1248, #1251) #1341makeORsflagsin, so the generator now passesframe.flags.__value__andreserved, likeHTTP._make_data. Before, an undefined flag bit (DATA 0x02/0x80, PING 0x40, WINDOW_UPDATE 0x02) or the reserved bit was lost on rebuild.SKIP:_make_tcp_optionskeepsEOOL/NOPsince fix(tcp): from_data reorders and re-pads TCP options #1163, so both now have cases (headers end00000000/01010100, bothOK). The rationale now covers only HOPOPT/IPv6-OptsPadN, which list input still collapses ontoPad1.Captures: only
options-tcp.pcapchanges, 27 → 29 frames (2158 → 2306 bytes), the two new TCP padding cases. All others are md5-identical.Tests: new
tests/protocols/test_option_generator_1337_unit.py, 9 subtests fail without the fix. Every module importing the generator: 465 passed, 9 skipped, 5186 subtests, 0 failed.