From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26485 invoked by alias); 18 May 2006 13:54:57 -0000 Received: (qmail 26477 invoked by uid 22791); 18 May 2006 13:54:56 -0000 X-Spam-Status: No, hits=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 May 2006 13:54:54 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1Fgixk-0004yk-00; Thu, 18 May 2006 15:54:48 +0200 Date: Thu, 18 May 2006 13:54:00 -0000 To: "Doyle, Patrick" Cc: 'Andrew Lunn' , "'ecos-devel@sources.redhat.com'" , 'Andrew Dyer' Subject: Re: RedBoot patches regarding redboot_getc_terminate Message-ID: <20060518135448.GB11223@lunn.ch> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2006-05/txt/msg00018.txt.bz2 On Thu, May 18, 2006 at 09:39:12AM -0400, Doyle, Patrick wrote: > > > > What happens to TFTP transfers with your change? Are they terminated > > gracefully? Or do they hang around until the server times out and > > kills them? > > > > Andrew > > > Unfortunately, I don't have any means to check that. Which is why I brought > it up as a topic for discussion. Then I realized that it would be easier to > discuss if somebody who _did_ have a means to check that checked that, which > led to me posting the patch :-) > > IIRC, a TFTP server will keep spewing out packets until it has sent the > whole file, and will retry and retransmit if the client stops responding. > So, it guess it depends on what the TFTP transport stream (implemented in > code somewhere in RedBoot) does when it gets a "terminate" call that isn't > an abort... > > Hmmm... looking at the code, I see something that looks like: > > if (abort) > tftp_error_ack(...) > else > tftp_ack(...) > > which looks to me like TFTP folks would be getting some sort of similar > error message for TFTP transfers. Well, it would depend on the exact error returned to the TFTP server. [Goes and looks at the code][Goes and looks at the RFC] 7. Premature Termination If a request can not be granted, or some error occurs during the transfer, then an ERROR packet (opcode 5) is sent. This is only a courtesy since it will not be retransmitted or acknowledged, so it may never be received. Timeouts must also be used to detect errors. It looks like reporting an error is the only way to abort the rest of the transfer. Depending on the TFTP server it might put a comment in /var/log/syslog etc, but most users don't read that unless something serious has gone wrong. I suggest for [X-Z]modem you read the RFC or whatever and find out if there is a graceful way of closing the connection, as opposed to a none graceful way which it currently seems to be doing according to your report. Andrew