* [PATCH net-next] ipv6: ip6_fragment() should check CHECKSUM_PARTIAL
@ 2012-05-18 21:02 Eric Dumazet
2012-05-19 3:54 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2012-05-18 21:02 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Tore Anderson
From: Eric Dumazet <edumazet@google.com>
Quoting Tore Anderson from :
If the allfrag feature has been set on a host route (due to an ICMPv6
Packet Too Big received indicating a MTU of less than 1280),
TCP SYN/ACK packets to that destination appears to get an incorrect
TCP checksum. This in turn means they are thrown away as invalid.
In the case of an IPv4 client behind a link with a MTU of less than
1260, accessing an IPv6 server through a stateless translator,
this means that the client can only download a single large file
from the server, because once it is in the server's routing cache
with the allfrag feature set, new TCP connections can no longer
be established.
</endquote>
It appears ip6_fragment() doesn't handle CHECKSUM_PARTIAL properly.
As network drivers are not prepared to fetch correct transport header, a
safe fix is to call skb_checksum_help() before fragmenting packet.
Reported-by: Tore Anderson <tore@fud.no>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Tested-by: Tore Anderson <tore@fud.no>
---
net/ipv6/ip6_output.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index a254e4b..3dc633f 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -788,6 +788,10 @@ slow_path_clean:
}
slow_path:
+ if ((skb->ip_summed == CHECKSUM_PARTIAL) &&
+ skb_checksum_help(skb))
+ goto fail;
+
left = skb->len - hlen; /* Space per frame */
ptr = hlen; /* Where to start from */
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] ipv6: ip6_fragment() should check CHECKSUM_PARTIAL
2012-05-18 21:02 [PATCH net-next] ipv6: ip6_fragment() should check CHECKSUM_PARTIAL Eric Dumazet
@ 2012-05-19 3:54 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-05-19 3:54 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, tore
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 18 May 2012 23:02:15 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> Quoting Tore Anderson from :
>
> If the allfrag feature has been set on a host route (due to an ICMPv6
> Packet Too Big received indicating a MTU of less than 1280),
> TCP SYN/ACK packets to that destination appears to get an incorrect
> TCP checksum. This in turn means they are thrown away as invalid.
>
> In the case of an IPv4 client behind a link with a MTU of less than
> 1260, accessing an IPv6 server through a stateless translator,
> this means that the client can only download a single large file
> from the server, because once it is in the server's routing cache
> with the allfrag feature set, new TCP connections can no longer
> be established.
>
> </endquote>
>
> It appears ip6_fragment() doesn't handle CHECKSUM_PARTIAL properly.
>
> As network drivers are not prepared to fetch correct transport header, a
> safe fix is to call skb_checksum_help() before fragmenting packet.
>
> Reported-by: Tore Anderson <tore@fud.no>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Tested-by: Tore Anderson <tore@fud.no>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-19 3:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-18 21:02 [PATCH net-next] ipv6: ip6_fragment() should check CHECKSUM_PARTIAL Eric Dumazet
2012-05-19 3:54 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).