Currently tftp code in the loader retransmits the previous packet if it receives any
unwanted packet(non-tftp). Change this to retransmit the packet(request or ack) only after a timeout. Obtained from: Juniper Networks Fixed by: Santhanakrishnan Balraj <sbalraj at juniper dot net>
This commit is contained in:
parent
6e4c6f18f7
commit
dc438c8ec8
@ -443,11 +443,15 @@ sendrecv_tftp(d, sproc, sbuf, ssize, rproc, rbuf, rsize)
|
||||
continue;
|
||||
}
|
||||
|
||||
recvnext:
|
||||
/* Try to get a packet and process it. */
|
||||
cc = (*rproc)(d, rbuf, rsize, tleft);
|
||||
/* Return on data, EOF or real error. */
|
||||
if (cc != -1 || errno != 0)
|
||||
return (cc);
|
||||
if ((getsecs() - t1) < tleft) {
|
||||
goto recvnext;
|
||||
}
|
||||
|
||||
/* Timed out or didn't get the packet we're waiting for */
|
||||
tleft += MINTMO;
|
||||
|
Loading…
x
Reference in New Issue
Block a user