Skip to content
Snippets Groups Projects
Commit 0bb6deda authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

TFTP: don't ack if wrong block num is received

If an unexpected block number was received, break out of the
switch loop.
parent 0a29e244
No related branches found
No related tags found
No related merge requests found
......@@ -599,11 +599,12 @@ static CURLcode tftp_rx(tftp_state_data_t *state, tftp_event_t event)
infof(data,
"Received unexpected DATA packet block %d\n", rblock);
state->retries++;
if(state->retries>state->retry_max) {
if(state->retries > state->retry_max) {
failf(data, "tftp_rx: giving up waiting for block %d",
NEXT_BLOCKNUM(state->block));
return CURLE_TFTP_ILLEGAL;
}
break;
}
/* This is the expected block. Reset counters and ACK it. */
state->block = (unsigned short)rblock;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment