Merge remote-tracking branch 'origin/master'

This commit is contained in:
H. Peter Anvin 2011-05-09 21:09:18 -07:00
commit 05ffcecaa8
3 changed files with 9 additions and 1 deletions

View file

@ -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;