diff options
author | Tom Herbert <therbert@google.com> | 2014-05-07 16:51:57 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-08 23:47:50 -0400 |
commit | 81249bea1fb003b6fcbc1709dd5a5fc1e26e168d (patch) | |
tree | b5cd760bc9e977432fc037ab4c1144550827f8fb /net/ipv6 | |
parent | b1036c6a470ccf5f18490a7ce4c99422d3bf77c4 (diff) | |
download | op-kernel-dev-81249bea1fb003b6fcbc1709dd5a5fc1e26e168d.zip op-kernel-dev-81249bea1fb003b6fcbc1709dd5a5fc1e26e168d.tar.gz |
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')
-rw-r--r-- | net/ipv6/ip6_gre.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index 75277b7..3873181 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) { |