提交 45ba9dd2 编写于 作者: Y YOSHIFUJI Hideaki 提交者: David S. Miller

[IPV6] ADDRCONF: Register inet6_dev earlier.

Allocate inet6_dev earlier to allow users to set up per-interface variables.
Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
上级 46d48046
...@@ -2177,6 +2177,14 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, ...@@ -2177,6 +2177,14 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
int run_pending = 0; int run_pending = 0;
switch(event) { switch(event) {
case NETDEV_REGISTER:
if (!idev) {
idev = ipv6_add_dev(dev);
if (!idev)
printk(KERN_WARNING "IPv6: add_dev failed for %s\n",
dev->name);
}
break;
case NETDEV_UP: case NETDEV_UP:
case NETDEV_CHANGE: case NETDEV_CHANGE:
if (event == NETDEV_UP) { if (event == NETDEV_UP) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册