From: Jiri Pirko Date: Fri, 30 Aug 2019 08:25:30 +0000 (+0200) Subject: mlx5: Add missing init_net check in FIB notifier X-Git-Tag: v5.4-rc1~131^2~94 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a21cf11bc57fca136f98e81ebc6a6eaf52952b8f;p=thirdparty%2Fkernel%2Flinux.git mlx5: Add missing init_net check in FIB notifier Take only FIB events that are happening in init_net into account. No other namespaces are supported. Signed-off-by: Jiri Pirko Acked-by: Roi Dayan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c index e697663939903..5d20d615663e7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c @@ -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;