mlx5: Add missing init_net check in FIB notifier
authorJiri Pirko <jiri@mellanox.com>
Fri, 30 Aug 2019 08:25:30 +0000 (10:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Sep 2019 18:44:14 +0000 (11:44 -0700)
Take only FIB events that are happening in init_net into account. No other
namespaces are supported.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c

index e697663939903562e876baeb008efc491b8f4371..5d20d615663e789aace6ede20f67871a8ef3bc17 100644 (file)
@@ -248,6 +248,9 @@ static int mlx5_lag_fib_event(struct notifier_block *nb,
        struct net_device *fib_dev;
        struct fib_info *fi;
 
+       if (!net_eq(info->net, &init_net))
+               return NOTIFY_DONE;
+
        if (info->family != AF_INET)
                return NOTIFY_DONE;