From: Herbert Xu Date: Thu, 28 Jun 2007 20:44:37 +0000 (-0700) Subject: [NET]: Fix TX checksum feature check X-Git-Tag: v2.6.23-rc1~1109^2~117 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a298830cd026b4c0cde45ef3679a5f68a17577e6;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: David S. Miller --- diff --git a/net/core/dev.c b/net/core/dev.c index 36e9bf8ec4a..6dce9d2d46f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -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; }