Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203183
b: refs/heads/master
c: 4b4194c
h: refs/heads/master
i:
  203181: 798027a
  203179: 587bfa3
  203175: 63543dd
  203167: 70a88e9
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 26, 2010
1 parent dd069f7 commit a001139
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 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: 59b80802a8a18b64d38b51aa168253684b2649d5
refs/heads/master: 4b4194c40f4ac8d03a700845f8978cba53246b5a
12 changes: 7 additions & 5 deletions trunk/net/ipv4/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,11 +333,14 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
struct net_device *dev = neigh->dev;
__be32 target = *(__be32*)neigh->primary_key;
int probes = atomic_read(&neigh->probes);
struct in_device *in_dev = in_dev_get(dev);
struct in_device *in_dev;

if (!in_dev)
rcu_read_lock();
in_dev = __in_dev_get_rcu(dev);
if (!in_dev) {
rcu_read_unlock();
return;

}
switch (IN_DEV_ARP_ANNOUNCE(in_dev)) {
default:
case 0: /* By default announce any local IP */
Expand All @@ -358,9 +361,8 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb)
case 2: /* Avoid secondary IPs, get a primary/preferred one */
break;
}
rcu_read_unlock();

if (in_dev)
in_dev_put(in_dev);
if (!saddr)
saddr = inet_select_addr(dev, target, RT_SCOPE_LINK);

Expand Down

0 comments on commit a001139

Please sign in to comment.