aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv6/addrconf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 567664eac46..e8c347579da 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2293,6 +2293,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
2293 break; 2293 break;
2294 } 2294 }
2295 2295
2296 if (!idev && dev->mtu >= IPV6_MIN_MTU)
2297 idev = ipv6_add_dev(dev);
2298
2296 if (idev) 2299 if (idev)
2297 idev->if_flags |= IF_READY; 2300 idev->if_flags |= IF_READY;
2298 } else { 2301 } else {
@@ -2357,12 +2360,18 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
2357 break; 2360 break;
2358 2361
2359 case NETDEV_CHANGEMTU: 2362 case NETDEV_CHANGEMTU:
2360 if ( idev && dev->mtu >= IPV6_MIN_MTU) { 2363 if (idev && dev->mtu >= IPV6_MIN_MTU) {
2361 rt6_mtu_change(dev, dev->mtu); 2364 rt6_mtu_change(dev, dev->mtu);
2362 idev->cnf.mtu6 = dev->mtu; 2365 idev->cnf.mtu6 = dev->mtu;
2363 break; 2366 break;
2364 } 2367 }
2365 2368
2369 if (!idev && dev->mtu >= IPV6_MIN_MTU) {
2370 idev = ipv6_add_dev(dev);
2371 if (idev)
2372 break;
2373 }
2374
2366 /* MTU falled under IPV6_MIN_MTU. Stop IPv6 on this interface. */ 2375 /* MTU falled under IPV6_MIN_MTU. Stop IPv6 on this interface. */
2367 2376
2368 case NETDEV_DOWN: 2377 case NETDEV_DOWN: