igmp: Call skb_checksum_simple_validate
authorTom Herbert <therbert@google.com>
Wed, 7 May 2014 23:52:10 +0000 (16:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 May 2014 03:47:50 +0000 (23:47 -0400)
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>
net/ipv4/igmp.c

index 97e4d1655d26bb65121c1a8954af2d7565c288a6..17d34e3c2ac34f326cf68d74e4c7193f6d86d8e6 100644 (file)
@@ -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) {