From: Tom Herbert Date: Wed, 7 May 2014 23:52:21 +0000 (-0700) Subject: icmp: Call skb_checksum_simple_validate X-Git-Tag: submit/tizen/20160607.132125~4450^2~262^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=29a96e1f36dbd6fc7911a6d517625c656ba4809f;p=sdk%2Femulator%2Femulator-kernel.git icmp: Call skb_checksum_simple_validate Use skb_checksum_simple_validate to verify checksum. Signed-off-by: Tom Herbert Signed-off-by: David S. Miller --- diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 0134663..fe52666 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -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)) - goto csum_error; - } + if (skb_checksum_simple_validate(skb)) + goto csum_error; if (!pskb_pull(skb, sizeof(*icmph))) goto error;