summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorasmodai <asmodai@FreeBSD.org>2001-02-02 10:53:02 +0000
committerasmodai <asmodai@FreeBSD.org>2001-02-02 10:53:02 +0000
commit09632ab08c4d65818f823803cc529204363d50b2 (patch)
tree6aab572687ccd06745593ff20a9e27858344a48c /usr.bin
parentfed402db9f07a884ada2c96768923fe70d39bbed (diff)
downloadFreeBSD-src-09632ab08c4d65818f823803cc529204363d50b2.zip
FreeBSD-src-09632ab08c4d65818f823803cc529204363d50b2.tar.gz
Fix tftpd and tftp to support file transfers of over 65535 blocks
(about 31 MB - 32 MB). Submitted (partially) by: Pascal Hofstee <daeron@wit401305.student.utwente.nl>
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tftp/tftp.13
-rw-r--r--usr.bin/tftp/tftp.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/tftp/tftp.1 b/usr.bin/tftp/tftp.1
index 15eab98..0c75272 100644
--- a/usr.bin/tftp/tftp.1
+++ b/usr.bin/tftp/tftp.1
@@ -167,6 +167,9 @@ protocol, the remote site will probably have some
sort of file-access restrictions in place. The
exact methods are specific to each site and therefore
difficult to document here.
+.Pp
+Files larger than 33488896 octets (65535 blocks) cannot be transferred
+without client and server supporting blocksize negotiation (RFC1783).
.Sh HISTORY
The
.Nm
diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c
index 9dc00af..e7dc824 100644
--- a/usr.bin/tftp/tftp.c
+++ b/usr.bin/tftp/tftp.c
@@ -96,7 +96,8 @@ xmitfile(fd, name, mode)
register struct tftphdr *ap; /* data and ack packets */
struct tftphdr *r_init(), *dp;
register int n;
- volatile int block, size, convert;
+ volatile unsigned short block;
+ volatile int size, convert;
volatile unsigned long amount;
struct sockaddr_in from;
int fromlen;
@@ -201,7 +202,8 @@ recvfile(fd, name, mode)
register struct tftphdr *ap;
struct tftphdr *dp, *w_init();
register int n;
- volatile int block, size, firsttrip;
+ volatile unsigned short block;
+ volatile int size, firsttrip;
volatile unsigned long amount;
struct sockaddr_in from;
int fromlen;
OpenPOWER on IntegriCloud