Skip to content

Commit

Permalink
gre6: Call skb_checksum_simple_validate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tom Herbert authored and David S. Miller committed May 9, 2014
1 parent b1036c6 commit 81249be
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions net/ipv6/ip6_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 81249be

Please sign in to comment.