1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-20 11:11:24 +00:00
freebsd/libexec/tftpd
Craig Rodrigues 38bd7db313 In the old TFTP server, there was an undocumented behavior where
the block counter would rollover to 0 if a file larger
than 65535 blocks was transferred.  With the default block size
of 512 octets per block, this is a file size of approximately 32 megabytes.

The new TFTP server code would report an error and stop transferring
the file if a file was larger than 65535 blocks.

This patch restores the old TFTP server's behavior to the new
TFTP server code.  If a TFTP client transfers a file larger
than 65535 blocks, and does *not* specify the "rollover" option,
then automatically rollover the block counter to 0 every time
we reach 65535 blocks.

This restores interoperability with the FreeBSD 6 TFTP client.
Without this change, if a FreeBSD 6 TFTP client tried to
retrieve a file larger than 65535 blocks from a FreeBSD 9 TFTP server
, the transfer would fail.
The same file could be retrieved successfully if the same FreeBSD 6
TFTP client was used against a FreeBSD 6 TFTP server.

Approved by:  re (kib)
Tested by: Pawan Gupta <pawang at juniper dot net>,
Obtained from:  Juniper Networks
2011-07-31 03:12:20 +00:00
..
Makefile Make WARNS=6 clean. 2010-09-24 10:40:17 +00:00
tftp-file.c Bring back synchnet() implementation from older 2011-06-24 02:56:24 +00:00
tftp-file.h Bring in new files from edwin's tftp 2010-05-04 13:07:40 +00:00
tftp-io.c Fix tftp_log() usage. 2011-05-26 20:32:33 +00:00
tftp-io.h Bring in new files from edwin's tftp 2010-05-04 13:07:40 +00:00
tftp-options.c Make WARNS=6 clean. 2010-09-24 10:40:17 +00:00
tftp-options.h Bring in new files from edwin's tftp 2010-05-04 13:07:40 +00:00
tftp-transfer.c In the old TFTP server, there was an undocumented behavior where 2011-07-31 03:12:20 +00:00
tftp-transfer.h Bring in new files from edwin's tftp 2010-05-04 13:07:40 +00:00
tftp-utils.c Fix typos. 2010-11-09 10:59:09 +00:00
tftp-utils.h Make WARNS=6 clean. 2010-09-24 10:40:17 +00:00
tftpd.8 Acknowledge Edwin Groothuis for the major rewrite he 2011-06-24 05:41:38 +00:00
tftpd.c Remove the duplicate logging of failed read requests, whose error message 2010-09-24 14:44:04 +00:00