From a90b2b155218d3ad21732fd6b0ec463506f1727d Mon Sep 17 00:00:00 2001 From: t_jeang Date: Tue, 6 Jan 2009 12:06:02 +0000 Subject: [PATCH] Ensure that packet csums are computed correctly when sending a GSO packet to an interface which supports scatter-gather but not transmit checksum offloads. Signed-off-by: Steven Smith --- net/core/dev.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 82d94393..dc304209 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -1369,6 +1369,18 @@ gso: skb->next = nskb->next; nskb->next = NULL; + + if (nskb->ip_summed == CHECKSUM_HW && + (!(dev->features & NETIF_F_GEN_CSUM) && + (!(dev->features & NETIF_F_IP_CSUM) || + nskb->protocol != htons(ETH_P_IP)))) { + if (skb_checksum_help(nskb, 0)) { + nskb->next = skb->next; + skb->next = nskb; + return NETDEV_TX_BUSY; + } + } + rc = dev->hard_start_xmit(nskb, dev); if (unlikely(rc)) { nskb->next = skb->next; -- 2.39.5