summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-08-30 10:25:30 +0200
committerDavid S. Miller <davem@davemloft.net>2019-09-02 11:44:14 -0700
commita21cf11bc57fca136f98e81ebc6a6eaf52952b8f (patch)
treec06303c9734dfe29d3ac4a0685638846c2081e54
parent765b7590c92d849806e9a27ab3a5a17cfc6a47a9 (diff)
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 <jiri@mellanox.com> Acked-by: Roi Dayan <roid@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c b/drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c
index e69766393990..5d20d615663e 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;