Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202695
b: refs/heads/master
c: 9a57a9d
h: refs/heads/master
i:
  202693: da6a321
  202691: 784aeb1
  202687: 79eb433
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 8, 2010
1 parent 0536bc8 commit 5487343
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66018506e15bea62de4eefc3298f170b4bfcf5ef
refs/heads/master: 9a57a9d291980302b4a3184fbc47dbddac71903e
10 changes: 4 additions & 6 deletions trunk/net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,18 +916,19 @@ static void igmp_heard_query(struct in_device *in_dev, struct sk_buff *skb,
read_unlock(&in_dev->mc_list_lock);
}

/* called in rcu_read_lock() section */
int igmp_rcv(struct sk_buff *skb)
{
/* This basically follows the spec line by line -- see RFC1112 */
struct igmphdr *ih;
struct in_device *in_dev = in_dev_get(skb->dev);
struct in_device *in_dev = __in_dev_get_rcu(skb->dev);
int len = skb->len;

if (in_dev == NULL)
goto drop;

if (!pskb_may_pull(skb, sizeof(struct igmphdr)))
goto drop_ref;
goto drop;

switch (skb->ip_summed) {
case CHECKSUM_COMPLETE:
Expand All @@ -937,7 +938,7 @@ int igmp_rcv(struct sk_buff *skb)
case CHECKSUM_NONE:
skb->csum = 0;
if (__skb_checksum_complete(skb))
goto drop_ref;
goto drop;
}

ih = igmp_hdr(skb);
Expand All @@ -957,7 +958,6 @@ int igmp_rcv(struct sk_buff *skb)
break;
case IGMP_PIM:
#ifdef CONFIG_IP_PIMSM_V1
in_dev_put(in_dev);
return pim_rcv_v1(skb);
#endif
case IGMPV3_HOST_MEMBERSHIP_REPORT:
Expand All @@ -971,8 +971,6 @@ int igmp_rcv(struct sk_buff *skb)
break;
}

drop_ref:
in_dev_put(in_dev);
drop:
kfree_skb(skb);
return 0;
Expand Down

0 comments on commit 5487343

Please sign in to comment.