summaryrefslogtreecommitdiffstats
path: root/libexec/tftpd
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 /libexec/tftpd
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 'libexec/tftpd')
-rw-r--r--libexec/tftpd/tftpd.85
-rw-r--r--libexec/tftpd/tftpd.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/libexec/tftpd/tftpd.8 b/libexec/tftpd/tftpd.8
index 41e0a92..ec3ece5 100644
--- a/libexec/tftpd/tftpd.8
+++ b/libexec/tftpd/tftpd.8
@@ -192,3 +192,8 @@ and the
.Fl c
option was introduced in
.Fx 5.0 .
+.Sh BUGS
+Files larger than 33488896 octets (65535 blocks) cannot be transferred
+without client and server supporting blocksize negotiation (RFC1783).
+.Pp
+Many tftp clients will not transfer files over 16744448 octets (32767 blocks).
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index f0f0ca4..f219f08 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -501,7 +501,7 @@ xmitfile(pf)
struct tftphdr *dp, *r_init();
register struct tftphdr *ap; /* ack packet */
register int size, n;
- volatile int block;
+ volatile unsigned short block;
signal(SIGALRM, timer);
dp = r_init();
@@ -571,7 +571,7 @@ recvfile(pf)
struct tftphdr *dp, *w_init();
register struct tftphdr *ap; /* ack buffer */
register int n, size;
- volatile int block;
+ volatile unsigned short block;
signal(SIGALRM, timer);
dp = w_init();
OpenPOWER on IntegriCloud