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

igmp: 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 81249bea
...@@ -988,16 +988,8 @@ int igmp_rcv(struct sk_buff *skb) ...@@ -988,16 +988,8 @@ int igmp_rcv(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(struct igmphdr))) if (!pskb_may_pull(skb, sizeof(struct igmphdr)))
goto drop; goto drop;
switch (skb->ip_summed) { if (skb_checksum_simple_validate(skb))
case CHECKSUM_COMPLETE:
if (!csum_fold(skb->csum))
break;
/* fall through */
case CHECKSUM_NONE:
skb->csum = 0;
if (__skb_checksum_complete(skb))
goto drop; goto drop;
}
ih = igmp_hdr(skb); ih = igmp_hdr(skb);
switch (ih->type) { switch (ih->type) {
......
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