]> Pileus Git - ~andy/linux/commitdiff
[IPV6] ADDRCONF: Register inet6_dev earlier.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Wed, 14 Feb 2007 17:07:27 +0000 (02:07 +0900)
committerDavid S. Miller <davem@sunset.davemloft.net>
Mon, 26 Feb 2007 19:42:55 +0000 (11:42 -0800)
Allocate inet6_dev earlier to allow users to set up per-interface variables.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
net/ipv6/addrconf.c

index 7a2a71536b5d4a22b875cf140de2bb6719148400..f6ac65d36559cf15825a5e63d0a182cd9a080f6e 100644 (file)
@@ -2177,6 +2177,14 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
        int run_pending = 0;
 
        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_CHANGE:
                if (event == NETDEV_UP) {