aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/udp/tftp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-11-25 16:06:29 +0000
committerMichael Brown <mcb30@etherboot.org>2007-11-25 16:06:29 +0000
commitf770744ee02fa4d6a3a2ec17eecb80a2a51cc540 (patch)
treeadc838618f92bed4214f318f6a5a0880a3b2d281 /src/net/udp/tftp.c
parent7f1518b2363e1ab4b10450df6f9eaff98f7dae3f (diff)
downloadipxe-f770744ee02fa4d6a3a2ec17eecb80a2a51cc540.tar.gz
Quick hack to be able to accept transfers from servers that don't
supply options.
Diffstat (limited to 'src/net/udp/tftp.c')
-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 194c533d6..354f825d1 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 ) );