From owner-freebsd-current Tue Jan 30 15:20:46 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 8109837B6D2 for ; Tue, 30 Jan 2001 15:20:26 -0800 (PST) Received: by shadowmere.student.utwente.nl (Postfix, from userid 1000) id 16EF41F9D; Wed, 31 Jan 2001 00:20:24 +0100 (CET) Date: Wed, 31 Jan 2001 00:20:24 +0100 From: Pascal Hofstee To: freebsd-current@freebsd.org Subject: Bug in tftpd ? Message-ID: <20010131002024.A77116@shadowmere.student.utwente.nl> Reply-To: daeron@shadowmere.student.utwente.nl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, I think i just encountered a bug in FreeBSD's tftpd-implementation. Actually it's a bug that i spotted a while back with a friend of mine in NetBSD's implementation, but never really bothered with it since i don't use tftpd myself, but i am in a position now where i need to with FreeBSD. The bug only triggers when trying to fetch files bigger than 32 MB. On NetBSD it happened around a 16 MB boundary ... (but i may have interpreted blocksizes wrong). The issue is located in a minor difference in tftpd's own "block" count and 's struct tftphdr 's "tu_block" type declaration defines the block count: unsigned short tu_block; /* block # */ tftpd.c 's xmitfile and recvfile functions define the block count: volatile int block; What happens is kinda obvious .... after quite a lot of data has been sent without any problems ... suddenly tftpd's block-counter starts wrapping while 's block counter does simply increase more. This results in "TIMEOUT errors" as the block-sequence numbers simply won't match any more. If patches are required let me know ... -- 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message