]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r224536:
authorsbruno <sbruno@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 4 Nov 2011 15:57:38 +0000 (15:57 +0000)
committersbruno <sbruno@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 4 Nov 2011 15:57:38 +0000 (15:57 +0000)
commitaa396b032dce1cb7d2698d98efdaef2693135039
tree6304dce5e3c3235e4427807ab79bfb5e128cd637
parent6298967fa39669f317ac066c78606d2fc26b1597
MFC r224536:
Confirmed behavior of a Cisco 6509 in production.

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.

git-svn-id: svn://svn.freebsd.org/base/stable/8@227083 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
libexec/tftpd/tftp-transfer.c