[U-Boot] Bug in IP/UDP defragment?
Wolfgang Denk
wd at denx.de
Sun Aug 8 11:28:41 CEST 2010
Dear "Fillod Stephane",
In message <0B45E93C5FF65740AEAE690BF3848B7A02087B60 at rennsmail04.eu.thmulti.com> you wrote:
>
> I'm encountering a problem when tftp'ing a file of size 1747851 bytes
> with
> CONFIG_IP_DEFRAG defined and CONFIG_TFTP_BLOCKSIZE set to 4096. U-Boot's
> tftp
> times out on the last chunk. Undefining
> CONFIG_IP_DEFRAG/CONFIG_TFTP_BLOCKSIZE
> or downloading with a Linux tftp client are all well, so it does not
> look like
> a server problem.
>...
> The patch below appears to solve my problem. WARNING: since I haven't
> rolled
> my mind yet around the NetDefragment IP/UDP stack, I don't know yet what
> are
> the side effects of my patch.
>
> --- a/net/net.c 31 Mar 2010 21:54:39
> +++ b/net/net.c 4 Jun 2010 15:09:08
> @@ -1201,7 +1201,7 @@ static IP_t *__NetDefragment(IP_t *ip, i
> h = payload + h->next_hole;
> }
>
> - if (offset8 + (len / 8) <= h - payload) {
> + if (offset8 + (len / 8) < h - payload) {
> /* no overlap with holes (dup fragment?) */
> return NULL;
> }
Can you please resubmit this (eventually integrating Alessandro's
comments) and add your Signed-off-by: line, so we can integrate this
fix into mainline?
Thanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
What about WRITING it first and rationalizing it afterwords? :-)
- Larry Wall in <8162 at jpl-devvax.JPL.NASA.GOV>
More information about the U-Boot
mailing list