mlx5: Add missing init_net check in FIB notifier
Subsystems (3)
PATCH v2 1/1 mlx5: Add missing init_net check in FIB notifier
From: Jiri Pirko <[email protected]>
Take only FIB events that are happening in init_net into account. No other namespaces are supported.
---v1->v2:
- no change, just cced maintainers (fat finger made me avoid them in v1)
--- drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c +3 -0
@@ -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 ;
Signature · 1 line
2.21.0
Quoted 19 lines · Jiri Pirko
From: Jiri Pirko <[email protected]>
Take only FIB events that are happening in
init_netinto account. No other namespaces are supported.Signed-off-by Jiri Pirko <[email protected]>---
v1->v2:
- no change, just cced maintainers (fat finger made me avoid them in v1)--- drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c | 3 +++ 1 file changed, 3 insertions(+)drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c static int mlx5_lag_fib_event(struct notifier_block *nb, · line 256
Quoted 9 lines
drivers/net/ethernet/mellanox/mlx5/core/lag_mp.c +3
-0@@ -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 ;
thanks
From: Jiri Pirko <[email protected]>
Date: Fri, 30 Aug 2019 10:25:30 +0200
Quoted 9 lines
From: Jiri Pirko <[email protected]>
Take only FIB events that are happening in
init_netinto account. No other namespaces are supported.Signed-off-by Jiri Pirko <[email protected]>---
v1->v2:
- no change, just cced maintainers (fat finger made me avoid them in v1)
Applied, thanks Jiri.