Take into consideration that the interface might be disabled for IPv6,
thus switch event type.

Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org>
---
 net/ipv6/addrconf.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d0c685c..c2dcebe 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3149,6 +3149,7 @@ static int addrconf_notify(struct notifier_block *this, 
unsigned long event,
 
        case NETDEV_UP:
        case NETDEV_CHANGE:
+netdev_change:
                if (dev->flags & IFF_SLAVE)
                        break;
 
@@ -3244,8 +3245,10 @@ static int addrconf_notify(struct notifier_block *this, 
unsigned long event,
 
                if (!idev && dev->mtu >= IPV6_MIN_MTU) {
                        idev = ipv6_add_dev(dev);
-                       if (!IS_ERR(idev))
-                               break;
+                       if (!IS_ERR(idev)) {
+                               event = NETDEV_UP;
+                               goto netdev_change;
+                       }
                }
 
                /*
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to