summaryrefslogtreecommitdiffstats
path: root/src/net/udp/tftp.c
diff options
context:
space:
mode:
authorMichael Brown2007-11-25 17:06:29 +0100
committerMichael Brown2007-11-25 17:06:29 +0100
commitf770744ee02fa4d6a3a2ec17eecb80a2a51cc540 (patch)
treeadc838618f92bed4214f318f6a5a0880a3b2d281 /src/net/udp/tftp.c
parentMerge branch 'mdc-working' of ssh://git.etherboot.org//pub/scm/people/mdc/gpxe (diff)
downloadipxe-f770744ee02fa4d6a3a2ec17eecb80a2a51cc540.tar.gz
ipxe-f770744ee02fa4d6a3a2ec17eecb80a2a51cc540.tar.xz
ipxe-f770744ee02fa4d6a3a2ec17eecb80a2a51cc540.zip
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 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 ) );