When receiving a file having a length, which is a mulitple of the blocksize,

close the file once it is received.

Reported by:	Timo Voelker
MFC after:	1 week
This commit is contained in:
Michael Tuexen 2020-12-15 09:43:18 +00:00
parent 369d70ec92
commit 1d0272a600
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368657

View File

@ -397,9 +397,9 @@ tftp_receive(int peer, uint16_t *block, struct tftp_stats *ts,
send_error(peer, ENOSPACE);
goto abort;
}
if (n_data != segsize)
write_close();
}
if (n_data != segsize)
write_close();
windowblock++;
/* Only send ACKs for the last block in the window. */