[git commit] tftp: do not risk invoking Sorcerer's Apprentice syndrome
Denys Vlasenko
vda.linux at googlemail.com
Sun May 10 21:27:43 UTC 2009
commit: http://git.busybox.net/busybox/commit/?id=c8ab67cad852ec2457adf15bf7883c2f5cdb1b00
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master
examples/udhcp/simple.script: fix incorrect test for $1
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
examples/udhcp/simple.script | 2 +-
networking/tftp.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/examples/udhcp/simple.script b/examples/udhcp/simple.script
index abf1b6f..40ee738 100644
--- a/examples/udhcp/simple.script
+++ b/examples/udhcp/simple.script
@@ -3,7 +3,7 @@
RESOLV_CONF="/etc/resolv.conf"
-[ -n "$1" ] || echo "Error: should be called from udhcpc" && exit 1
+[ -n "$1" ] || { echo "Error: should be called from udhcpc"; exit 1; }
NETMASK=""
[ -n "$subnet" ] && NETMASK="netmask $subnet"
diff --git a/networking/tftp.c b/networking/tftp.c
index 352037f..6cd3f69 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -501,11 +501,14 @@ static int tftp_protocol(
}
continue; /* send ACK */
}
+/* Disabled to cope with servers with Sorcerer's Apprentice Syndrome */
+#if 0
if (recv_blk == (block_nr - 1)) {
/* Server lost our TFTP_ACK. Resend it */
block_nr = recv_blk;
continue;
}
+#endif
}
if (CMD_PUT(option_mask32) && (opcode == TFTP_ACK)) {
--
1.6.0.6
More information about the busybox-cvs
mailing list