Skip to content

Commit a298830

Browse files
herbertxDavid S. Miller
authored andcommitted
[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>
1 parent 58e50a9 commit a298830

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎net/core/dev.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,11 +1509,11 @@ int dev_queue_xmit(struct sk_buff *skb)
15091509
skb_set_transport_header(skb, skb->csum_start -
15101510
skb_headroom(skb));
15111511

1512-
if (!(dev->features & NETIF_F_GEN_CSUM)
1513-
|| ((dev->features & NETIF_F_IP_CSUM)
1514-
&& skb->protocol == htons(ETH_P_IP))
1515-
|| ((dev->features & NETIF_F_IPV6_CSUM)
1516-
&& skb->protocol == htons(ETH_P_IPV6)))
1512+
if (!(dev->features & NETIF_F_GEN_CSUM) &&
1513+
!((dev->features & NETIF_F_IP_CSUM) &&
1514+
skb->protocol == htons(ETH_P_IP)) &&
1515+
!((dev->features & NETIF_F_IPV6_CSUM) &&
1516+
skb->protocol == htons(ETH_P_IPV6)))
15171517
if (skb_checksum_help(skb))
15181518
goto out_kfree_skb;
15191519
}

0 commit comments

Comments
 (0)