Date: Thu, 10 Dec 2020 19:36:33 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r368521 - head/libexec/tftpd Message-ID: <202012101936.0BAJaXpH066475@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012101936.0BAJaXpH066475>