]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
IPV6: Disable SG for GSO unless we have checksum
authorDavid Miller <davem@davemloft.net>
Thu, 28 Sep 2006 02:04:35 +0000 (19:04 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 20:23:27 +0000 (13:23 -0700)
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>
net/ipv6/ipv6_sockglue.c

index a5eaaf693abf7dad7c3e320f775bafa0f4be631b..1c50e6a63d119b4a7b68ae16dbb90830d30d6899 100644 (file)
@@ -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 |