summaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
authorTom Herbert <therbert@google.com>2014-05-08 01:52:10 +0200
committerDavid S. Miller <davem@davemloft.net>2014-05-09 05:47:50 +0200
commitde08dc1a8e7052f4cbaf920ce0af6bb261595705 (patch)
tree906e38e21691aea4f19524f71c04b9b39f05819f /net/ipv4/igmp.c
parentgre6: Call skb_checksum_simple_validate (diff)
downloadlinux-de08dc1a8e7052f4cbaf920ce0af6bb261595705.tar.xz
linux-de08dc1a8e7052f4cbaf920ce0af6bb261595705.zip
igmp: 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>
Diffstat (limited to '')
-rw-r--r--net/ipv4/igmp.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 97e4d1655d26..17d34e3c2ac3 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -988,16 +988,8 @@ int igmp_rcv(struct sk_buff *skb)
if (!pskb_may_pull(skb, sizeof(struct igmphdr)))
goto drop;
- 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 drop;
- }
+ if (skb_checksum_simple_validate(skb))
+ goto drop;
ih = igmp_hdr(skb);
switch (ih->type) {