ip_gre: allow CSUM capable devices to handle packets
authorDmitry Kravkov <dmitry@broadcom.com>
Mon, 18 Feb 2013 09:50:52 +0000 (09:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Feb 2013 05:51:09 +0000 (00:51 -0500)
If device is not able to handle checksumming it will
be handled in dev_xmit

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c

index a56f1182c176dd87cff194914bd379f9674f6b00..cdc31ac4a9dfa1227df35b233c1033b7c0320022 100644 (file)
@@ -745,12 +745,9 @@ static struct sk_buff *handle_offloads(struct sk_buff *skb)
                        goto error;
                skb_shinfo(skb)->gso_type |= SKB_GSO_GRE;
                return skb;
-       } else if (skb->ip_summed == CHECKSUM_PARTIAL) {
-               err = skb_checksum_help(skb);
-               if (unlikely(err))
-                       goto error;
        }
-       skb->ip_summed = CHECKSUM_NONE;
+       if (skb->ip_summed != CHECKSUM_PARTIAL)
+               skb->ip_summed = CHECKSUM_NONE;
 
        return skb;