int __init addrconf_init(void)
{
- struct inet6_dev *idev, *bdev;
+ struct inet6_dev *idev;
int i, err;
err = ipv6_addr_label_init();
*/
rtnl_lock();
idev = ipv6_add_dev(init_net.loopback_dev);
- bdev = ipv6_add_dev(blackhole_netdev);
rtnl_unlock();
if (IS_ERR(idev)) {
err = PTR_ERR(idev);
goto errlo;
- } else if (IS_ERR(bdev)) {
- err = PTR_ERR(bdev);
- goto errlo;
}
ip6_route_init_special_entries();
addrconf_ifdown(dev, 1);
}
addrconf_ifdown(init_net.loopback_dev, 2);
- addrconf_ifdown(blackhole_netdev, 2);
/*
* Check hash table.
static void rt6_uncached_list_flush_dev(struct net *net, struct net_device *dev)
{
+ struct net_device *loopback_dev = net->loopback_dev;
int cpu;
- if (dev == net->loopback_dev)
+ if (dev == loopback_dev)
return;
for_each_possible_cpu(cpu) {
struct net_device *rt_dev = rt->dst.dev;
if (rt_idev->dev == dev) {
- rt->rt6i_idev = in6_dev_get(blackhole_netdev);
+ rt->rt6i_idev = in6_dev_get(loopback_dev);
in6_dev_put(rt_idev);
}
{
struct rt6_info *rt = (struct rt6_info *)dst;
struct inet6_dev *idev = rt->rt6i_idev;
+ struct net_device *loopback_dev =
+ dev_net(dev)->loopback_dev;
- if (idev && idev->dev != dev_net(dev)->loopback_dev) {
- struct inet6_dev *ibdev = in6_dev_get(blackhole_netdev);
- if (ibdev) {
- rt->rt6i_idev = ibdev;
+ if (idev && idev->dev != loopback_dev) {
+ struct inet6_dev *loopback_idev = in6_dev_get(loopback_dev);
+ if (loopback_idev) {
+ rt->rt6i_idev = loopback_idev;
in6_dev_put(idev);
}
}