From nobody@FreeBSD.org  Mon Apr  3 05:45:14 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21])
	by hub.freebsd.org (Postfix) with ESMTP id BD97B37BDDA
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Apr 2000 05:45:14 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.9.3/8.9.2) id FAA14786;
	Mon, 3 Apr 2000 05:45:13 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Message-Id: <200004031245.FAA14786@freefall.freebsd.org>
Date: Mon, 3 Apr 2000 05:45:13 -0700 (PDT)
From: ph.jounin@computer.org
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: TFTP can not handle big files (> 32MBytes)
X-Send-Pr-Version: www-1.0

>Number:         17772
>Category:       bin
>Synopsis:       TFTP can not handle big files (> 32MBytes)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr  3 05:50:01 PDT 2000
>Closed-Date:    Sat Jun 16 08:19:31 PDT 2001
>Last-Modified:  Sat Jun 16 08:19:52 PDT 2001
>Originator:     Philippe Jounin
>Release:        3.4
>Organization:
>Environment:
i386 (and others 32-bit hosts)
>Description:
A big file (more than 32MBytes) can not been downloaded/uploaded 
whith the current TFTP client.
After sending/receiving the segment #65535, TFTP waits for the segment
#65536 which can not be produced, since TFTP protocol reserves only 
2 bytes for packet number.

I have not checked if the TFTP server has the same limitation.

>How-To-Repeat:
Transfer a big file and use a correct TFTP server.



>Fix:
The following lines in the file /usr.bin/tftp/tftp.c should 
include u_short cast :
165, 176, 269, 279

For instance
if (ap->th_block == (block-1)) {
should be fixed in
if (ap->th_block == (u_short) (block-1)) {


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mikeh 
State-Changed-When: Sat Jun 16 08:19:31 PDT 2001 
State-Changed-Why:  
Fixed in rev 1.6 of tftp.c. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17772 
>Unformatted:
