summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/net/udp/tftp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c
index 194c533d..354f825d 100644
--- a/src/net/udp/tftp.c
+++ b/src/net/udp/tftp.c
@@ -433,6 +433,8 @@ static int tftp_rx_data ( struct tftp_request *tftp,
data_len = iob_len ( iobuf );
/* Check for correct block */
+ if ( ( tftp->state == -1 ) && ( block == 1 ) )
+ tftp->state = 0;
if ( block != ( tftp->state + 1 ) ) {
DBGC ( tftp, "TFTP %p received out-of-order block %d "
"(expecting %d)\n", tftp, block, ( tftp->state + 1 ) );