Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2002 07:37:50 -0800 (PST)
From:      Todd Hayton <thayton@torrentnet.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/34412: tftp will still try and receive traffic even after receiver's disk has filled
Message-ID:  <200201291537.g0TFbol82304@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         34412
>Category:       misc
>Synopsis:       tftp will still try and receive traffic even after receiver's disk has filled
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 29 07:40:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Todd Hayton
>Release:        FreeBSD 2.2
>Organization:
Ericsson
>Environment:
>Description:
When copying a large file using tftp, if during the course of the
transfer the disk of the receiver fills up, tftp will still try
and receive more data from the sender ignoring the fact that the
write()'s are failing because there is no more space left.

Glancing over the tftp code (/usr/src/usr.bin/tftp) I noticed that
the function recvfile() in tftp.c is responsible for the reception 
of a file. Within this function another function called write_behind() 
is responsible for writing the received data to disk. Although the
write_behind() function returns the return value of the write() system 
call, this return value is never checked in the calling function recvfile().

The result is that tftp will continue recv'ing and subsequently
trying to write() the data despite the fact that each call to write()
fails.
>How-To-Repeat:
Try tftp'ing a large file onto a filesystem that doesn't have enough
room to hold it.
>Fix:
      
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201291537.g0TFbol82304>