Repository navigation
Conversation
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.
Follow up on #97 with a regression test for a segment that begins before the 32-bit sequence number wrap and ends after the current ACK.
With ACK at 3, send eight distinct bytes starting at
u32::MAX - 2. Six bytes are already acknowledged (MAX-2, MAX-1, MAX, 0, 1, 2); only the final two should be delivered. Check the exact bytes, ACK advancing to 5, and an empty reassembly queue. Reinsert the same segment and check that it produces no duplicate data or ACK advancement.The test passes with the existing #97 implementation. Restoring the pre-#97 behavior that drops every segment starting below ACK makes this test fail (
Noneinstead of the two new bytes).Test-only change; no production code changes.
Validated on upstream
44bb34fe50bd9c04290b4b4f9bbeece1626a95d4on macOS arm64 with Rust 1.99.0:cargo fmt -- --checkcargo test --offline --locked: 37 unit tests and 23 documentation tests pass.cargo clippy --offline --locked --all-targets -- -D warningsThe same commit and Cargo.lock were also validated on Linux ARM64 (Debian 12, Rust 1.98.1): all 37 unit tests and 23 documentation tests pass, as do formatting, Clippy with all targets/features and
-D warnings, and the examples/tests build. Checks ran offline in a container with networking disabled. No live TUN/network test was performed.Native Linux AMD64 validation also passes on Debian 13 with Rust 1.98.1, using the same commit and Cargo.lock: 37 unit tests, 23 documentation tests, formatting, Clippy for all targets/features with
-D warnings, and the examples/tests build.