aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 038f511c73fa..0f1beceb47d5 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1291,7 +1291,8 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
1291static int fib_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) 1291static int fib_netdev_event(struct notifier_block *this, unsigned long event, void *ptr)
1292{ 1292{
1293 struct net_device *dev = netdev_notifier_info_to_dev(ptr); 1293 struct net_device *dev = netdev_notifier_info_to_dev(ptr);
1294 struct netdev_notifier_changeupper_info *info; 1294 struct netdev_notifier_changeupper_info *upper_info = ptr;
1295 struct netdev_notifier_info_ext *info_ext = ptr;
1295 struct in_device *in_dev; 1296 struct in_device *in_dev;
1296 struct net *net = dev_net(dev); 1297 struct net *net = dev_net(dev);
1297 unsigned int flags; 1298 unsigned int flags;
@@ -1326,16 +1327,19 @@ static int fib_netdev_event(struct notifier_block *this, unsigned long event, vo
1326 fib_sync_up(dev, RTNH_F_LINKDOWN); 1327 fib_sync_up(dev, RTNH_F_LINKDOWN);
1327 else 1328 else
1328 fib_sync_down_dev(dev, event, false); 1329 fib_sync_down_dev(dev, event, false);
1329 /* fall through */ 1330 rt_cache_flush(net);
1331 break;
1330 case NETDEV_CHANGEMTU: 1332 case NETDEV_CHANGEMTU:
1333 fib_sync_mtu(dev, info_ext->ext.mtu);
1331 rt_cache_flush(net); 1334 rt_cache_flush(net);
1332 break; 1335 break;
1333 case NETDEV_CHANGEUPPER: 1336 case NETDEV_CHANGEUPPER:
1334 info = ptr; 1337 upper_info = ptr;
1335 /* flush all routes if dev is linked to or unlinked from 1338 /* flush all routes if dev is linked to or unlinked from
1336 * an L3 master device (e.g., VRF) 1339 * an L3 master device (e.g., VRF)
1337 */ 1340 */
1338 if (info->upper_dev && netif_is_l3_master(info->upper_dev)) 1341 if (upper_info->upper_dev &&
1342 netif_is_l3_master(upper_info->upper_dev))
1339 fib_disable_ip(dev, NETDEV_DOWN, true); 1343 fib_disable_ip(dev, NETDEV_DOWN, true);
1340 break; 1344 break;
1341 } 1345 }