]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NET]: Fix TX checksum feature check
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Jun 2007 20:44:37 +0000 (13:44 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:16:19 +0000 (22:16 -0700)
This patch fixes a boolean error in the new TX checksum check
that causes bogus TSO packets to be generated.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c

index 36e9bf8ec4af24facfb95876f19ab55d8d1f57f3..6dce9d2d46f23e8a42e50dd70039f4f5be17b161 100644 (file)
@@ -1509,11 +1509,11 @@ int dev_queue_xmit(struct sk_buff *skb)
                skb_set_transport_header(skb, skb->csum_start -
                                              skb_headroom(skb));
 
-               if (!(dev->features & NETIF_F_GEN_CSUM)
-                   || ((dev->features & NETIF_F_IP_CSUM)
-                       && skb->protocol == htons(ETH_P_IP))
-                   || ((dev->features & NETIF_F_IPV6_CSUM)
-                       && skb->protocol == htons(ETH_P_IPV6)))
+               if (!(dev->features & NETIF_F_GEN_CSUM) &&
+                   !((dev->features & NETIF_F_IP_CSUM) &&
+                     skb->protocol == htons(ETH_P_IP)) &&
+                   !((dev->features & NETIF_F_IPV6_CSUM) &&
+                     skb->protocol == htons(ETH_P_IPV6)))
                        if (skb_checksum_help(skb))
                                goto out_kfree_skb;
        }