From owner-freebsd-bugs Tue Jan 29 15: 0:22 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1F3B837B404 for ; Tue, 29 Jan 2002 15:00:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g0TN05e05692; Tue, 29 Jan 2002 15:00:05 -0800 (PST) (envelope-from gnats) Date: Tue, 29 Jan 2002 15:00:05 -0800 (PST) Message-Id: <200201292300.g0TN05e05692@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J. Clark" Subject: Re: misc/34412: tftp will still try and receive traffic even after receiver's disk has filled Reply-To: "Crist J. Clark" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR misc/34412; it has been noted by GNATS. From: "Crist J. Clark" To: Maxim Konovalov Cc: bug-followup@FreeBSD.ORG Subject: Re: misc/34412: tftp will still try and receive traffic even after receiver's disk has filled Date: Tue, 29 Jan 2002 14:50:17 -0800 On Tue, Jan 29, 2002 at 10:20:02AM -0800, Maxim Konovalov wrote: [snip] > ... and for tftp: > > Index: tftp.c > =================================================================== > RCS file: /home/ncvs/src/usr.bin/tftp/tftp.c,v > retrieving revision 1.7 > diff -u -r1.7 tftp.c > --- tftp.c 2001/12/11 23:43:15 1.7 > +++ tftp.c 2002/01/29 18:13:09 > @@ -242,6 +242,10 @@ > goto abort; > } > write_behind(file, convert); > + if (errno == ENOSPC ) { > + nak(errno + 100); > + break; > + } > for ( ; ; ) { > alarm(rexmtval); > do { Actually, this should read, Index: tftp.c =================================================================== RCS file: /home/ncvs/src/usr.bin/tftp/tftp.c,v retrieving revision 1.7 diff -u -r1.7 tftp.c --- tftp.c 2001/12/11 23:43:15 1.7 +++ tftp.c 2002/01/29 18:13:09 @@ -242,6 +242,10 @@ goto abort; } write_behind(file, convert); + if (errno == ENOSPC ) { + nak(ENOSPACE); + break; + } for ( ; ; ) { alarm(rexmtval); do { That is, there is a specific error code for this condition specified within the TFTP protocol (RFC 1350). -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message