diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-05-10 23:27:43 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-05-10 23:27:43 +0200 |
commit | c8ab67cad852ec2457adf15bf7883c2f5cdb1b00 (patch) | |
tree | 18829f74854afb26e11a1364b38d158fe7a0a2f3 | |
parent | 8082ea1000af5103b86611835cdca23863e201db (diff) | |
download | busybox-w32-c8ab67cad852ec2457adf15bf7883c2f5cdb1b00.tar.gz busybox-w32-c8ab67cad852ec2457adf15bf7883c2f5cdb1b00.tar.bz2 busybox-w32-c8ab67cad852ec2457adf15bf7883c2f5cdb1b00.zip |
tftp: do not risk invoking Sorcerer's Apprentice syndrome
examples/udhcp/simple.script: fix incorrect test for $1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | examples/udhcp/simple.script | 2 | ||||
-rw-r--r-- | networking/tftp.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/examples/udhcp/simple.script b/examples/udhcp/simple.script index abf1b6f26..40ee73822 100644 --- a/examples/udhcp/simple.script +++ b/examples/udhcp/simple.script | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | RESOLV_CONF="/etc/resolv.conf" | 4 | RESOLV_CONF="/etc/resolv.conf" |
5 | 5 | ||
6 | [ -n "$1" ] || echo "Error: should be called from udhcpc" && exit 1 | 6 | [ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; } |
7 | 7 | ||
8 | NETMASK="" | 8 | NETMASK="" |
9 | [ -n "$subnet" ] && NETMASK="netmask $subnet" | 9 | [ -n "$subnet" ] && NETMASK="netmask $subnet" |
diff --git a/networking/tftp.c b/networking/tftp.c index 352037f1b..6cd3f69d3 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -501,11 +501,14 @@ static int tftp_protocol( | |||
501 | } | 501 | } |
502 | continue; /* send ACK */ | 502 | continue; /* send ACK */ |
503 | } | 503 | } |
504 | /* Disabled to cope with servers with Sorcerer's Apprentice Syndrome */ | ||
505 | #if 0 | ||
504 | if (recv_blk == (block_nr - 1)) { | 506 | if (recv_blk == (block_nr - 1)) { |
505 | /* Server lost our TFTP_ACK. Resend it */ | 507 | /* Server lost our TFTP_ACK. Resend it */ |
506 | block_nr = recv_blk; | 508 | block_nr = recv_blk; |
507 | continue; | 509 | continue; |
508 | } | 510 | } |
511 | #endif | ||
509 | } | 512 | } |
510 | 513 | ||
511 | if (CMD_PUT(option_mask32) && (opcode == TFTP_ACK)) { | 514 | if (CMD_PUT(option_mask32) && (opcode == TFTP_ACK)) { |