aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 500c2430007c..cca6a55909eb 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -531,9 +531,7 @@ struct pneigh_entry * pneigh_lookup(struct neigh_table *tbl,
531 if (!n) 531 if (!n)
532 goto out; 532 goto out;
533 533
534#ifdef CONFIG_NET_NS 534 write_pnet(&n->net, hold_net(net));
535 n->net = hold_net(net);
536#endif
537 memcpy(n->key, pkey, key_len); 535 memcpy(n->key, pkey, key_len);
538 n->dev = dev; 536 n->dev = dev;
539 if (dev) 537 if (dev)
@@ -1350,9 +1348,7 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
1350 1348
1351 dev_hold(dev); 1349 dev_hold(dev);
1352 p->dev = dev; 1350 p->dev = dev;
1353#ifdef CONFIG_NET_NS 1351 write_pnet(&p->net, hold_net(net));
1354 p->net = hold_net(net);
1355#endif
1356 p->sysctl_table = NULL; 1352 p->sysctl_table = NULL;
1357 write_lock_bh(&tbl->lock); 1353 write_lock_bh(&tbl->lock);
1358 p->next = tbl->parms.next; 1354 p->next = tbl->parms.next;
@@ -1407,9 +1403,7 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
1407 unsigned long now = jiffies; 1403 unsigned long now = jiffies;
1408 unsigned long phsize; 1404 unsigned long phsize;
1409 1405
1410#ifdef CONFIG_NET_NS 1406 write_pnet(&tbl->parms.net, &init_net);
1411 tbl->parms.net = &init_net;
1412#endif
1413 atomic_set(&tbl->parms.refcnt, 1); 1407 atomic_set(&tbl->parms.refcnt, 1);
1414 tbl->parms.reachable_time = 1408 tbl->parms.reachable_time =
1415 neigh_rand_reach_time(tbl->parms.base_reachable_time); 1409 neigh_rand_reach_time(tbl->parms.base_reachable_time);