aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-06-28 16:44:37 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:16:19 -0400
commita298830cd026b4c0cde45ef3679a5f68a17577e6 (patch)
tree211a4d13360027e8136b32453ebc6d97a87b8ef7 /net/core
parent58e50a904ec78caf4ca938801c031413b0d3f962 (diff)
[NET]: Fix TX checksum feature check
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>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 36e9bf8ec4af..6dce9d2d46f2 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1509,11 +1509,11 @@ int dev_queue_xmit(struct sk_buff *skb)
1509 skb_set_transport_header(skb, skb->csum_start - 1509 skb_set_transport_header(skb, skb->csum_start -
1510 skb_headroom(skb)); 1510 skb_headroom(skb));
1511 1511
1512 if (!(dev->features & NETIF_F_GEN_CSUM) 1512 if (!(dev->features & NETIF_F_GEN_CSUM) &&
1513 || ((dev->features & NETIF_F_IP_CSUM) 1513 !((dev->features & NETIF_F_IP_CSUM) &&
1514 && skb->protocol == htons(ETH_P_IP)) 1514 skb->protocol == htons(ETH_P_IP)) &&
1515 || ((dev->features & NETIF_F_IPV6_CSUM) 1515 !((dev->features & NETIF_F_IPV6_CSUM) &&
1516 && skb->protocol == htons(ETH_P_IPV6))) 1516 skb->protocol == htons(ETH_P_IPV6)))
1517 if (skb_checksum_help(skb)) 1517 if (skb_checksum_help(skb))
1518 goto out_kfree_skb; 1518 goto out_kfree_skb;
1519 } 1519 }