Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132131
b: refs/heads/master
c: 176c39a
h: refs/heads/master
i:
  132129: 4d0c7bc
  132127: c8764d4
v: v3
  • Loading branch information
Daniel Lezcano authored and David S. Miller committed Mar 3, 2009
1 parent bcf245a commit 3ec8639
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 31 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: b325fddb7f869e6c95a88dc6573220f162e5b89f
refs/heads/master: 176c39af29bc4edaf37f663553eeaacd47b5bc9c
39 changes: 9 additions & 30 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2611,9 +2611,6 @@ static int addrconf_ifdown(struct net_device *dev, int how)

ASSERT_RTNL();

if ((dev->flags & IFF_LOOPBACK) && how == 1)
how = 0;

rt6_ifdown(net, dev);
neigh_ifdown(&nd_tbl, dev);

Expand Down Expand Up @@ -4448,25 +4445,6 @@ int unregister_inet6addr_notifier(struct notifier_block *nb)

EXPORT_SYMBOL(unregister_inet6addr_notifier);

static void addrconf_net_exit(struct net *net)
{
struct net_device *dev;

rtnl_lock();
/* clean dev list */
for_each_netdev(net, dev) {
if (__in6_dev_get(dev) == NULL)
continue;
addrconf_ifdown(dev, 1);
}
addrconf_ifdown(net->loopback_dev, 2);
rtnl_unlock();
}

static struct pernet_operations addrconf_net_ops = {
.exit = addrconf_net_exit,
};

/*
* Init / cleanup code
*/
Expand Down Expand Up @@ -4508,10 +4486,6 @@ int __init addrconf_init(void)
if (err)
goto errlo;

err = register_pernet_device(&addrconf_net_ops);
if (err)
return err;

register_netdevice_notifier(&ipv6_dev_notf);

addrconf_verify(0);
Expand Down Expand Up @@ -4541,15 +4515,22 @@ int __init addrconf_init(void)
void addrconf_cleanup(void)
{
struct inet6_ifaddr *ifa;
struct net_device *dev;
int i;

unregister_netdevice_notifier(&ipv6_dev_notf);
unregister_pernet_device(&addrconf_net_ops);

unregister_pernet_subsys(&addrconf_ops);

rtnl_lock();

/* clean dev list */
for_each_netdev(&init_net, dev) {
if (__in6_dev_get(dev) == NULL)
continue;
addrconf_ifdown(dev, 1);
}
addrconf_ifdown(init_net.loopback_dev, 2);

/*
* Check hash table.
*/
Expand All @@ -4570,6 +4551,4 @@ void addrconf_cleanup(void)

del_timer(&addr_chk_timer);
rtnl_unlock();

unregister_pernet_subsys(&addrconf_net_ops);
}

0 comments on commit 3ec8639

Please sign in to comment.