mirror of
https://kernel.googlesource.com/pub/scm/network/tftp/tftp-hpa
synced 2025-04-26 01:49:52 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
05ffcecaa8
3 changed files with 9 additions and 1 deletions
3
CHANGES
3
CHANGES
|
@ -6,6 +6,9 @@ Changes in 5.1:
|
|||
|
||||
Build fixes.
|
||||
|
||||
Fix handling of block number wraparound after a successful
|
||||
options negotiation.
|
||||
|
||||
|
||||
Changes in 5.0:
|
||||
Try to on platforms with getaddrinfo() without AI_ADDRCONFIG or
|
||||
|
|
|
@ -245,7 +245,8 @@ myrecvfrom(int s, void *buf, int len, unsigned int flags,
|
|||
|
||||
int
|
||||
myrecvfrom(int s, void *buf, int len, unsigned int flags,
|
||||
struct sockaddr *from, int *fromlen, union sock_addr *myaddr)
|
||||
struct sockaddr *from, socklen_t * fromlen,
|
||||
union sock_addr *myaddr)
|
||||
{
|
||||
/* There is no way we can get the local address, fudge it */
|
||||
|
||||
|
|
|
@ -1648,6 +1648,10 @@ static void tftp_recvfile(const struct formats *pf, struct tftphdr *oap, int oac
|
|||
ap->th_opcode = htons((u_short) ACK);
|
||||
ap->th_block = htons((u_short) block);
|
||||
acksize = 4;
|
||||
/* If we're sending a regular ACK, that means we have successfully
|
||||
* sent the OACK. Clear oap so that we won't try to send another
|
||||
* OACK when the block number wraps back to 0. */
|
||||
oap = NULL;
|
||||
}
|
||||
if (!++block)
|
||||
block = rollover_val;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue