* [U-Boot] [PATCH] ip/defrag: fix processing of last short fragment
@ 2010-06-11 17:26 Fillod Stephane
2010-06-19 22:07 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Fillod Stephane @ 2010-06-11 17:26 UTC (permalink / raw)
To: u-boot
TFTP'ing a file of size 1747851 bytes with CONFIG_IP_DEFRAG and
CONFIG_TFTP_BLOCKSIZE set to 4096 fails with a timeout, because
the last fragment is not taken into account. This patch fixes
IP fragments having less than 8 bytes of payload.
Signed-off-by: Stephane Fillod <stephane.fillod@grassvalley.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
---
Many thanks to Alessandro for the explanation and the better suggestion.
PS: Sorry for my stinky MUA breaking References: field :-(
--- a/net/net.c 31 Mar 2010 21:54:39
+++ b/net/net.c 11 Jun 2010 15:36:37
@@ -1201,7 +1201,8 @@ static IP_t *__NetDefragment(IP_t *ip, i
h = payload + h->next_hole;
}
- if (offset8 + (len / 8) <= h - payload) {
+ /* last fragment may be 1..7 bytes, the "+7" forces acceptance
*/
+ if (offset8 + ((len + 7) / 8) <= h - payload) {
/* no overlap with holes (dup fragment?) */
return NULL;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] ip/defrag: fix processing of last short fragment
2010-06-11 17:26 [U-Boot] [PATCH] ip/defrag: fix processing of last short fragment Fillod Stephane
@ 2010-06-19 22:07 ` Mike Frysinger
2010-06-20 3:29 ` Ben Warren
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2010-06-19 22:07 UTC (permalink / raw)
To: u-boot
On Friday, June 11, 2010 13:26:43 Fillod Stephane wrote:
> TFTP'ing a file of size 1747851 bytes with CONFIG_IP_DEFRAG and
> CONFIG_TFTP_BLOCKSIZE set to 4096 fails with a timeout, because
> the last fragment is not taken into account. This patch fixes
> IP fragments having less than 8 bytes of payload.
could we get this reviewed/merged before 2010.06 since it looks like kind of a
bad bug ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100619/46415a49/attachment.pgp
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] ip/defrag: fix processing of last short fragment
2010-06-19 22:07 ` Mike Frysinger
@ 2010-06-20 3:29 ` Ben Warren
0 siblings, 0 replies; 3+ messages in thread
From: Ben Warren @ 2010-06-20 3:29 UTC (permalink / raw)
To: u-boot
On Saturday, June 19, 2010, Mike Frysinger <vapier@gentoo.org> wrote:
> On Friday, June 11, 2010 13:26:43 Fillod Stephane wrote:
>> TFTP'ing a file of size 1747851 bytes with CONFIG_IP_DEFRAG and
>> CONFIG_TFTP_BLOCKSIZE set to 4096 fails with a timeout, because
>> the last fragment is not taken into account. This patch fixes
>> IP fragments having less than 8 bytes of payload.
>
> could we get this reviewed/merged before 2010.06 since it looks like kind of a
> bad bug ?
Sure, I'm planning to work through my backlog tonight.
> -mike
>
Regards,
Ben
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-06-20 3:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-11 17:26 [U-Boot] [PATCH] ip/defrag: fix processing of last short fragment Fillod Stephane
2010-06-19 22:07 ` Mike Frysinger
2010-06-20 3:29 ` Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox