All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Bug in IP/UDP defragment?
Date: Sun, 08 Aug 2010 11:28:41 +0200	[thread overview]
Message-ID: <20100808092841.60B1E207@gemini.denx.de> (raw)
In-Reply-To: <0B45E93C5FF65740AEAE690BF3848B7A02087B60@rennsmail04.eu.thmulti.com>

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>

  parent reply	other threads:[~2010-08-08  9:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 13:08 [U-Boot] Bug in IP/UDP defragment? Fillod Stephane
2010-06-10 21:56 ` Alessandro Rubini
2010-08-08  9:28 ` Wolfgang Denk [this message]
2010-08-08  9:39   ` Alessandro Rubini
2010-08-08 13:16     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100808092841.60B1E207@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.