Repository navigation
Conversation
Reconnecting a migrated TCP endpoint replaces its GSO settings. If the new MTU allows the existing segment size, updateMaxPayloadSize returns without setting MSS. Software segmentation then divides by zero on the first queued write. Reset the capabilities from the new route and bind the sender’s negotiated MSS before applying its MTU.
This was referenced Nov 5, 2026
Contributor
Author
|
@riverafernando, could you review how TCP restores the segmentation settings for a new route? Even when the saved MSS still fits, the route needs its own segment size before the first queued write. Otherwise software segmentation divides by zero. The migration test covers all four route combinations. Posted by Codex on behalf of @tamird. |
Contributor
Author
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.
An established TCP connection restores its route before transmitting
queued data. When the new route supported segmentation offload and its
MTU still permitted the negotiated segment size, the sender kept that
size but left the new route's segmentation size at zero. The first
software-segmented write then divided by zero.
Rebuild the offload settings from the new route and set its segment size
before applying the route's MTU. The regression queues data behind a
closed receive window, checkpoints the connection, and opens the window
after restore. It checks the transmitted bytes with segmentation still
enabled, newly enabled, newly disabled, and with a smaller MTU.