Skip to content

Commit

Permalink
igmp: Call skb_checksum_simple_validate
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tom Herbert authored and David S. Miller committed May 9, 2014
1 parent 81249be commit de08dc1
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit de08dc1

Please sign in to comment.