projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4905434
)
applying fix for:
author
Paul Fox
<pgf@brightstareng.com>
Wed, 20 Jul 2005 19:49:15 +0000
(19:49 -0000)
committer
Paul Fox
<pgf@brightstareng.com>
Wed, 20 Jul 2005 19:49:15 +0000
(19:49 -0000)
0000271
: [PATCH] tftp -g fails if a TFTP_ACK is lost
networking/tftp.c
patch
|
blob
|
history
diff --git
a/networking/tftp.c
b/networking/tftp.c
index 334d03b6ab4e3f6e0d98e7e1034b828fcf283bb7..9b974778546fe4d8825997402dc16aa501ca11c1 100644
(file)
--- a/
networking/tftp.c
+++ b/
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;
}
}