aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index ae92131c4f89..253c86b78ff0 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -496,7 +496,7 @@ struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
496 if (atomic_read(&tbl->entries) > (1 << nht->hash_shift)) 496 if (atomic_read(&tbl->entries) > (1 << nht->hash_shift))
497 nht = neigh_hash_grow(tbl, nht->hash_shift + 1); 497 nht = neigh_hash_grow(tbl, nht->hash_shift + 1);
498 498
499 hash_val = tbl->hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift); 499 hash_val = tbl->hash(n->primary_key, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
500 500
501 if (n->parms->dead) { 501 if (n->parms->dead) {
502 rc = ERR_PTR(-EINVAL); 502 rc = ERR_PTR(-EINVAL);
@@ -508,7 +508,7 @@ struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
508 n1 != NULL; 508 n1 != NULL;
509 n1 = rcu_dereference_protected(n1->next, 509 n1 = rcu_dereference_protected(n1->next,
510 lockdep_is_held(&tbl->lock))) { 510 lockdep_is_held(&tbl->lock))) {
511 if (dev == n1->dev && !memcmp(n1->primary_key, pkey, key_len)) { 511 if (dev == n1->dev && !memcmp(n1->primary_key, n->primary_key, key_len)) {
512 if (want_ref) 512 if (want_ref)
513 neigh_hold(n1); 513 neigh_hold(n1);
514 rc = n1; 514 rc = n1;