Skip to content

Commit

Permalink
ipv4: Fix neigh lookup keying over loopback/point-to-point devices.
Browse files Browse the repository at this point in the history
We were using a special key "0" for all loopback and point-to-point
device neigh lookups under ipv4, but we wouldn't use that special
key for the neigh creation.

So basically we'd make a new neigh at each and every lookup :-)

This special case to use only one neigh for these device types
is of dubious value, so just remove it entirely.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 20, 2012
1 parent fa0afcd commit 0bb4087
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions include/net/arp.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ static inline struct neighbour *__ipv4_neigh_lookup_noref(struct net_device *dev
struct neighbour *n;
u32 hash_val;

if (dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))
key = 0;

hash_val = arp_hashfn(key, dev, nht->hash_rnd[0]) >> (32 - nht->hash_shift);
for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]);
n != NULL;
Expand Down

0 comments on commit 0bb4087

Please sign in to comment.