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>
This commit is contained in:
Tom Herbert 2014-05-07 16:51:57 -07:00 committed by David S. Miller
parent b1036c6a47
commit 81249bea1f
1 changed files with 1 additions and 11 deletions

View File

@ -468,17 +468,7 @@ static int ip6gre_rcv(struct sk_buff *skb)
goto drop; goto drop;
if (flags&GRE_CSUM) { if (flags&GRE_CSUM) {
switch (skb->ip_summed) { csum = skb_checksum_simple_validate(skb);
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;
}
offset += 4; offset += 4;
} }
if (flags&GRE_KEY) { if (flags&GRE_KEY) {