summaryrefslogtreecommitdiff
path: root/busybox/networking
diff options
context:
space:
mode:
authorRob Landley2005-08-13 00:46:00 +0000
committerRob Landley2005-08-13 00:46:00 +0000
commit6022fc8723c4bfaf055011db33f69565fa0c82b1 (patch)
treef37b984e249247f2bdf6679e8b01158afcb56e16 /busybox/networking
parentfc455b2101edbf97331384831de2989ce9cdb731 (diff)
downloadbusybox-6022fc8723c4bfaf055011db33f69565fa0c82b1.zip
busybox-6022fc8723c4bfaf055011db33f69565fa0c82b1.tar.gz
Backport:
10882 tar fix 10884, 10920, 11128 tail fixes 10885 tftp -g fix 10900 dpkg fix (script support) And I guess 10918 isn't relevant?
Diffstat (limited to 'busybox/networking')
-rw-r--r--busybox/networking/tftp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/busybox/networking/tftp.c b/busybox/networking/tftp.c
index 47fc387..bc57f10 100644
--- a/busybox/networking/tftp.c
+++ b/busybox/networking/tftp.c
@@ -320,7 +320,7 @@ static inline int tftp(const int cmd, const struct hostent *host,
FD_ZERO(&rfds);
FD_SET(socketfd, &rfds);
- switch (select(FD_SETSIZE, &rfds, NULL, NULL, &tv)) {
+ switch (select(socketfd + 1, &rfds, NULL, NULL, &tv)) {
case 1:
len = recvfrom(socketfd, buf, tftp_bufsize, 0,
(struct sockaddr *) &from, &fromlen);
@@ -463,6 +463,11 @@ static inline int tftp(const int cmd, const struct hostent *host,
--block_nr;
opcode = TFTP_ACK;
continue;
+ } else if (tmp + 1 == block_nr) {
+ /* Server lost our TFTP_ACK. Resend it */
+ block_nr = tmp;
+ opcode = TFTP_ACK;
+ continue;
}
}