[BusyBox] Another issue/bug in tftp.c
Christian Meyer
chrisime at web.de
Mon Jul 21 15:17:19 UTC 2003
Hi!
We ran into another issue in tftp.c. The problem exists in busybox 0.60.x, 1.0.0pre1 and in the snapshot releases (currently 21th July). Have a look at line 289 (beginning of the do ... while loop).
When a package is successfully transferred the timeout variable is set to 0 (line 332).
Now imagine if there's a timeout:
...
case 0:
error_msg("timeout");
if (timeout == 0) {
len = -1;
error_msg("last timeout");
} else {
timeout--;
}
break;
....
The client gives up way too soon because timeout is set to 0 (line 332 as mentioned before).
There's a solution for that problem:
--- tftp.c Fri Jul 18 16:40:10 2003
+++ tftp.c Mon Jul 21 16:10:23 2003
@@ -288,7 +288,8 @@
/* send packet */
-
+ timeout = bb_tftp_num_retries; /* re-initialize */
+
do {
len = cp - buf;
The timeout is set before the do ... while loop and thus it should solve the problem.
Regards,
Christian Meyer
Technische Universit?t M?nchen
E-Mail: meyerc at in.tum.de
UIN: 72107443
______________________________________________________________________________
Wo gibt es den besten Spam-Schutz? Laut ComputerBild 15-03 bei
WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021122
More information about the busybox
mailing list