diff options
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index de654ea8a944..857915a12c15 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -388,7 +388,7 @@ struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net, | |||
388 | hash_val = tbl->hash(pkey, NULL); | 388 | hash_val = tbl->hash(pkey, NULL); |
389 | for (n = tbl->hash_buckets[hash_val & tbl->hash_mask]; n; n = n->next) { | 389 | for (n = tbl->hash_buckets[hash_val & tbl->hash_mask]; n; n = n->next) { |
390 | if (!memcmp(n->primary_key, pkey, key_len) && | 390 | if (!memcmp(n->primary_key, pkey, key_len) && |
391 | dev_net(n->dev) == net) { | 391 | net_eq(dev_net(n->dev), net)) { |
392 | neigh_hold(n); | 392 | neigh_hold(n); |
393 | NEIGH_CACHE_STAT_INC(tbl, hits); | 393 | NEIGH_CACHE_STAT_INC(tbl, hits); |
394 | break; | 394 | break; |
@@ -483,7 +483,7 @@ struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl, | |||
483 | 483 | ||
484 | for (n = tbl->phash_buckets[hash_val]; n; n = n->next) { | 484 | for (n = tbl->phash_buckets[hash_val]; n; n = n->next) { |
485 | if (!memcmp(n->key, pkey, key_len) && | 485 | if (!memcmp(n->key, pkey, key_len) && |
486 | (pneigh_net(n) == net) && | 486 | net_eq(pneigh_net(n), net) && |
487 | (n->dev == dev || !n->dev)) { | 487 | (n->dev == dev || !n->dev)) { |
488 | read_unlock_bh(&tbl->lock); | 488 | read_unlock_bh(&tbl->lock); |
489 | goto out; | 489 | goto out; |
@@ -542,7 +542,7 @@ int pneigh_delete(struct neigh_table *tbl, struct net *net, const void *pkey, | |||
542 | for (np = &tbl->phash_buckets[hash_val]; (n = *np) != NULL; | 542 | for (np = &tbl->phash_buckets[hash_val]; (n = *np) != NULL; |
543 | np = &n->next) { | 543 | np = &n->next) { |
544 | if (!memcmp(n->key, pkey, key_len) && n->dev == dev && | 544 | if (!memcmp(n->key, pkey, key_len) && n->dev == dev && |
545 | (pneigh_net(n) == net)) { | 545 | net_eq(pneigh_net(n), net)) { |
546 | *np = n->next; | 546 | *np = n->next; |
547 | write_unlock_bh(&tbl->lock); | 547 | write_unlock_bh(&tbl->lock); |
548 | if (tbl->pdestructor) | 548 | if (tbl->pdestructor) |
@@ -1286,7 +1286,7 @@ static inline struct neigh_parms *lookup_neigh_params(struct neigh_table *tbl, | |||
1286 | struct neigh_parms *p; | 1286 | struct neigh_parms *p; |
1287 | 1287 | ||
1288 | for (p = &tbl->parms; p; p = p->next) { | 1288 | for (p = &tbl->parms; p; p = p->next) { |
1289 | if ((p->dev && p->dev->ifindex == ifindex && neigh_parms_net(p) == net) || | 1289 | if ((p->dev && p->dev->ifindex == ifindex && net_eq(neigh_parms_net(p), net)) || |
1290 | (!p->dev && !ifindex)) | 1290 | (!p->dev && !ifindex)) |
1291 | return p; | 1291 | return p; |
1292 | } | 1292 | } |
@@ -1964,7 +1964,7 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb) | |||
1964 | break; | 1964 | break; |
1965 | 1965 | ||
1966 | for (nidx = 0, p = tbl->parms.next; p; p = p->next) { | 1966 | for (nidx = 0, p = tbl->parms.next; p; p = p->next) { |
1967 | if (net != neigh_parms_net(p)) | 1967 | if (!net_eq(neigh_parms_net(p), net)) |
1968 | continue; | 1968 | continue; |
1969 | 1969 | ||
1970 | if (nidx++ < neigh_skip) | 1970 | if (nidx++ < neigh_skip) |
@@ -2161,7 +2161,7 @@ static struct neighbour *neigh_get_first(struct seq_file *seq) | |||
2161 | n = tbl->hash_buckets[bucket]; | 2161 | n = tbl->hash_buckets[bucket]; |
2162 | 2162 | ||
2163 | while (n) { | 2163 | while (n) { |
2164 | if (dev_net(n->dev) != net) | 2164 | if (!net_eq(dev_net(n->dev), net)) |
2165 | goto next; | 2165 | goto next; |
2166 | if (state->neigh_sub_iter) { | 2166 | if (state->neigh_sub_iter) { |
2167 | loff_t fakep = 0; | 2167 | loff_t fakep = 0; |
@@ -2204,7 +2204,7 @@ static struct neighbour *neigh_get_next(struct seq_file *seq, | |||
2204 | 2204 | ||
2205 | while (1) { | 2205 | while (1) { |
2206 | while (n) { | 2206 | while (n) { |
2207 | if (dev_net(n->dev) != net) | 2207 | if (!net_eq(dev_net(n->dev), net)) |
2208 | goto next; | 2208 | goto next; |
2209 | if (state->neigh_sub_iter) { | 2209 | if (state->neigh_sub_iter) { |
2210 | void *v = state->neigh_sub_iter(state, n, pos); | 2210 | void *v = state->neigh_sub_iter(state, n, pos); |
@@ -2260,7 +2260,7 @@ static struct pneigh_entry *pneigh_get_first(struct seq_file *seq) | |||
2260 | state->flags |= NEIGH_SEQ_IS_PNEIGH; | 2260 | state->flags |= NEIGH_SEQ_IS_PNEIGH; |
2261 | for (bucket = 0; bucket <= PNEIGH_HASHMASK; bucket++) { | 2261 | for (bucket = 0; bucket <= PNEIGH_HASHMASK; bucket++) { |
2262 | pn = tbl->phash_buckets[bucket]; | 2262 | pn = tbl->phash_buckets[bucket]; |
2263 | while (pn && (pneigh_net(pn) != net)) | 2263 | while (pn && !net_eq(pneigh_net(pn), net)) |
2264 | pn = pn->next; | 2264 | pn = pn->next; |
2265 | if (pn) | 2265 | if (pn) |
2266 | break; | 2266 | break; |
@@ -2283,7 +2283,7 @@ static struct pneigh_entry *pneigh_get_next(struct seq_file *seq, | |||
2283 | if (++state->bucket > PNEIGH_HASHMASK) | 2283 | if (++state->bucket > PNEIGH_HASHMASK) |
2284 | break; | 2284 | break; |
2285 | pn = tbl->phash_buckets[state->bucket]; | 2285 | pn = tbl->phash_buckets[state->bucket]; |
2286 | while (pn && (pneigh_net(pn) != net)) | 2286 | while (pn && !net_eq(pneigh_net(pn), net)) |
2287 | pn = pn->next; | 2287 | pn = pn->next; |
2288 | if (pn) | 2288 | if (pn) |
2289 | break; | 2289 | break; |