summaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_gre.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-05-07 16:51:57 -0700
committerDavid S. Miller <davem@davemloft.net>2014-05-08 23:47:50 -0400
commit81249bea1fb003b6fcbc1709dd5a5fc1e26e168d (patch)
treeb5cd760bc9e977432fc037ab4c1144550827f8fb /net/ipv6/ip6_gre.c
parentb1036c6a470ccf5f18490a7ce4c99422d3bf77c4 (diff)
downloadtalos-obmc-linux-81249bea1fb003b6fcbc1709dd5a5fc1e26e168d.tar.gz
talos-obmc-linux-81249bea1fb003b6fcbc1709dd5a5fc1e26e168d.zip
gre6: Call skb_checksum_simple_validate
Use skb_checksum_simple_validate to verify checksum. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_gre.c')
-rw-r--r--net/ipv6/ip6_gre.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c
index 75277b739b04..3873181ed856 100644
--- a/net/ipv6/ip6_gre.c
+++ b/net/ipv6/ip6_gre.c
@@ -468,17 +468,7 @@ static int ip6gre_rcv(struct sk_buff *skb)
goto drop;
if (flags&GRE_CSUM) {
- switch (skb->ip_summed) {
- case CHECKSUM_COMPLETE:
- csum = csum_fold(skb->csum);
- if (!csum)
- break;
- /* fall through */
- case CHECKSUM_NONE:
- skb->csum = 0;
- csum = __skb_checksum_complete(skb);
- skb->ip_summed = CHECKSUM_COMPLETE;
- }
+ csum = skb_checksum_simple_validate(skb);
offset += 4;
}
if (flags&GRE_KEY) {
OpenPOWER on IntegriCloud