Commit 29a96e1f authored by Tom Herbert's avatar Tom Herbert Committed by David S. Miller

icmp: Call skb_checksum_simple_validate

Use skb_checksum_simple_validate to verify checksum.
Signed-off-by: default avatarTom Herbert <therbert@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent de08dc1a
......@@ -908,16 +908,8 @@ int icmp_rcv(struct sk_buff *skb)
ICMP_INC_STATS_BH(net, ICMP_MIB_INMSGS);
switch (skb->ip_summed) {
case CHECKSUM_COMPLETE:
if (!csum_fold(skb->csum))
break;
/* fall through */
case CHECKSUM_NONE:
skb->csum = 0;
if (__skb_checksum_complete(skb))
if (skb_checksum_simple_validate(skb))
goto csum_error;
}
if (!pskb_pull(skb, sizeof(*icmph)))
goto error;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment