Re: [Etherboot-developers] proto_tftm.c -- Etherboot Multicast TFTP
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2003-09-03 00:59:11
|
"Timothy Legge" <tl...@ro...> writes:
> > It should just be a simple walk of the bitmap. The slam
> > protocol batches all of it into a single request which is certainly
> > more than you need.
>
> I found the source of my corruption. Slam calculates the size of the
> second last packet (???) instead of the last packet. Does it not use
> the last packet?
I believe slam uses zero based number for it's packets, where
tftp uses one based number. Which leads naturally to an off
by one difference between the pieces of code. It has been a long
time since I looked at the code in detail.
> /* Compute the expected data length */
> if (packet != state.total_packets -1) {
> data_len = state.block_size;
> } else {
> data_len = state.total_bytes % state.block_size;
> }
>
> I removed the -1 and my problem went away. I did not figure it out till
> I used all your checks for bad packets.
Cool. I am glad my sanity checks helped.
Eric
|