svn commit: r368521 - head/libexec/tftpd

Michael Tuexen tuexen at FreeBSD.org
Thu Dec 10 19:36:33 UTC 2020


Author: tuexen
Date: Thu Dec 10 19:36:33 2020
New Revision: 368521
URL: https://svnweb.freebsd.org/changeset/base/368521

Log:
  Fix the TFTP client when performing a RRQ for files smaller than 512 bytes
  and the server not sending an OACK:
  * Close the file.
  * Report the correct the number of received blocks.
  
  MFC after:		1 week

Modified:
  head/libexec/tftpd/tftp-transfer.c

Modified: head/libexec/tftpd/tftp-transfer.c
==============================================================================
--- head/libexec/tftpd/tftp-transfer.c	Thu Dec 10 18:34:15 2020	(r368520)
+++ head/libexec/tftpd/tftp-transfer.c	Thu Dec 10 19:36:33 2020	(r368521)
@@ -280,6 +280,8 @@ tftp_receive(int peer, uint16_t *block, struct tftp_st
 		}
 
 		if (fb_size != segsize) {
+			ts->blocks++;
+			write_close();
 			gettimeofday(&(ts->tstop), NULL);
 			return;
 		}


More information about the svn-src-all mailing list