mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
[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>
This commit is contained in:
parent
58e50a904e
commit
a298830cd0
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user