From owner-freebsd-current Wed Jan 31 10:39:54 2001 Delivered-To: freebsd-current@freebsd.org Received: from shadowmere.student.utwente.nl (wit401305.student.utwente.nl [130.89.236.145]) by hub.freebsd.org (Postfix) with ESMTP id 5AE4137B491 for ; Wed, 31 Jan 2001 10:39:35 -0800 (PST) Received: by shadowmere.student.utwente.nl (Postfix, from userid 1000) id 7506A1F9D; Wed, 31 Jan 2001 19:39:34 +0100 (CET) Date: Wed, 31 Jan 2001 19:39:34 +0100 From: Pascal Hofstee To: freebsd-current@freebsd.org Subject: Re: Bug in tftpd ? Message-ID: <20010131193934.C68538@shadowmere.student.utwente.nl> Reply-To: daeron@shadowmere.student.utwente.nl References: <20010131002024.A77116@shadowmere.student.utwente.nl> <20010131121353.A21533@shadowmere.student.utwente.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="OwLcNYc0lM97+oe1" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010131121353.A21533@shadowmere.student.utwente.nl>; from daeron@shadowmere.student.utwente.nl on Wed, Jan 31, 2001 at 12:13:54PM +0100 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Jan 31, 2001 at 12:13:54PM +0100, Pascal Hofstee wrote: > Patches attached: > Obtained from: NetBSD > > (Committed there about 3 months ago after we first spotted the problem in > their implementation) Ok .. I noticed a minor glitch in my previous patch .. the "unsigned int" should be "unsigned short" Apparently NetBSD still uses the "unsigned int" so may still show the same problem. New patche attached. -- Pascal Hofstee < daeron @ shadowmere . student . utwente . nl > begin LOVE-LETTER-FOR-YOU.TXT.vbs I'm a signature virus. Please copy me and help me spread. end --OwLcNYc0lM97+oe1 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tftpd.patch" --- tftpd.8.orig Wed Jan 31 11:59:57 2001 +++ tftpd.8 Wed Jan 31 12:04:55 2001 @@ -192,3 +192,9 @@ .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). + --- tftpd.c.orig Wed Jan 31 11:55:53 2001 +++ tftpd.c Wed Jan 31 11:58:00 2001 @@ -501,7 +501,7 @@ 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 @@ 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(); --OwLcNYc0lM97+oe1-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message