From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Sun, 08 Aug 2010 11:28:41 +0200 Subject: [U-Boot] Bug in IP/UDP defragment? In-Reply-To: <0B45E93C5FF65740AEAE690BF3848B7A02087B60@rennsmail04.eu.thmulti.com> References: <0B45E93C5FF65740AEAE690BF3848B7A02087B60@rennsmail04.eu.thmulti.com> Message-ID: <20100808092841.60B1E207@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear "Fillod Stephane", In message <0B45E93C5FF65740AEAE690BF3848B7A02087B60@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@jpl-devvax.JPL.NASA.GOV>