This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: redboot tftp not acking all packets?



> -----Original Message-----
> From: Andy Dyer 
> Sent: Tuesday, March 02, 2004 3:42 PM
> To: 'ecos-discuss@ecos.sourceware.org'
> Subject: redboot tftp not acking all packets?
> 
> 
> Hello all:
> 	I seem to be having a problem with tftp when I 
> download an unstripped elf file via tftp in redboot.
> The tftp server is a PC running cygwin, and the symptom
> I see is for every tftp transfer I do it leaves a copy
> of in.tftpd.exe running on the PC.  These seem to have a
> really long timeout, and leave the file open on the PC,
> so I have to manually kill the processes if I want to
> remove the file.
> 
> I captured the packets on the wire, and it seems that
> once redboot gets what it needs from the elf file, it
> stops ack'ing the transfer, leaving the server process to
> sit there resending.
> 
> What I see in the packet dump is the data packets and acks
> proceed correctly in sequence up to 149, then the tftp
> server sends 150 and redboot never ack's 150, instead
> returning to the command prompt.
> 
> The full file I'm trying to load is 874787 bytes long, which
> should be 1709 tftp blocks (512 bytes/per).  If I look at the
> output of objdump -h on the elf file it looks like the file
> offset of the start of the debugging info (.stab) is 0x129f4
> or 148.9 tftp blocks worth of data.
> 
> 

Here is a patch to fix the problem with redboot not reading to
the end of an ELF file and leaving the TFTP server connection
hanging.  This sends an error packet back to the server after
redboot is done as this is the only way to close a connection
except to read the whole file.

I tested it against the cygwin in.tftpd on Win2000.  Since I don't
have access to many TFTP servers, I would like it if people could
test it against some others.  If the people with CVS access feel it's
good, feel free to commit it.


--
Andrew Dyer               |  adyer@righthandtech.com
Sr. Engineer              |  (630) 238-0789
RightHand Technologies    |  (630) 238-0469 (fax)
735 N. Edgewood Ave.      |
Suite D                   |
Wood Dale, IL 60191-1261  |
USA                       |

Attachment: tftp-patch.txt
Description: tftp-patch.txt

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]