Commit bfc2a7d5 authored by David S. Miller's avatar David S. Miller

[IPV6]: Temp fix for ipv6 link-local address problem.

Make sure loopback_dev, if up, has the ipv6 bits
for it setup before the addrconf netdev notifier
is registered.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2c6e4a98
......@@ -3387,6 +3387,29 @@ int unregister_inet6addr_notifier(struct notifier_block *nb)
void __init addrconf_init(void)
{
/* The addrconf netdev notifier requires that loopback_dev
* has it's ipv6 private information allocated and setup
* before it can bring up and give link-local addresses
* to other devices which are up.
*
* Unfortunately, loopback_dev is not necessarily the first
* entry in the global dev_base list of net devices. In fact,
* it is likely to be the very last entry on that list.
* So this causes the notifier registry below to try and
* give link-local addresses to all devices besides loopback_dev
* first, then loopback_dev, which cases all the non-loopback_dev
* devices to fail to get a link-local address.
*
* So, as a temporary fix, register loopback_dev first by hand.
* Longer term, all of the dependencies ipv6 has upon the loopback
* device and it being up should be removed.
*/
rtnl_lock();
addrconf_notify(&ipv6_dev_notf, NETDEV_REGISTER, &loopback_dev);
if (loopback_dev.flags & IFF_UP)
addrconf_notify(&ipv6_dev_notf, NETDEV_UP, &loopback_dev);
rtnl_unlock();
register_netdevice_notifier(&ipv6_dev_notf);
#ifdef CONFIG_IPV6_PRIVACY
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment