summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2006-09-27 19:04:35 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-13 13:23:27 -0700
commit92a86ee1f6027881b77b75d48a09e3a946a93d13 (patch)
treea490fcfbef3928c06de5be419bef01ea3f3fcef3 /net
parentf2fb7f11c1dc0cf66f290671f4a7b427e63da64c (diff)
IPV6: Disable SG for GSO unless we have checksum
Because the system won't turn off the SG flag for us we need to do this manually on the IPv6 path. Otherwise we will throw IPv6 packets with bad checksums at the hardware. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/ipv6/ipv6_sockglue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index a5eaaf693abf..1c50e6a63d11 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -123,6 +123,9 @@ static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
struct ipv6hdr *ipv6h;
struct inet6_protocol *ops;
+ if (!(features & NETIF_F_HW_CSUM))
+ features &= ~NETIF_F_SG;
+
if (unlikely(skb_shinfo(skb)->gso_type &
~(SKB_GSO_UDP |
SKB_GSO_DODGY |