Repository navigation
[NET-640] Retry outstanding TFTP write packets after timeouts - #423
Open
hutiefang76 wants to merge 1 commit into
Open
hutiefang76 wants to merge 1 commit into
hutiefang76 wants to merge 1 commit into
Conversation
Resend the pending write request or DATA packet after a receive timeout. Preserve its data buffer when replying to a packet from another TID. Add real UDP regressions for lost ACKs and payload preservation. Jira: https://issues.apache.org/jira/browse/NET-640 Assisted-By: DeepSeek Assisted-By: Codex
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.
A lost ACK currently makes
TFTPClient.sendFilewait repeatedly without resending the outstanding packet. Retry the current write request or DATA packet after a receive timeout, keeping the existing retry limit.The pending DATA payload shares the buffered-send array. Send an unexpected-TID error through the unbuffered path so that answering another peer cannot overwrite the data needed for a later retry.
The new real loopback UDP tests cover empty, full-block and multi-block uploads, lost write-request/intermediate/final ACKs, byte-identical retransmission, logical byte counts, and an intervening unexpected-TID reply. Sockets use ephemeral ports and bounded waits, with explicit cleanup.
Fixes NET-640.
Validation:
SocketClientTest.testConnectUnresolvedandTestConnectTimeout; both also failed with original production source. Both pristine controls and the complete final build passed in the isolated Linux environment.Thanks for your contribution to Apache Commons! Your help is appreciated!
Before you push a pull request, review this list:
mvn; that'smvnon the command line by itself.AI assistance: DeepSeek Pro drafted implementation/tests and reviewed the patch; Codex coordinated native validation and refined setup, scope and formatting.