summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-09-04 09:40:47 +0200
committerDavid S. Miller <davem@davemloft.net>2019-09-05 12:14:10 +0200
commit8330f73fe9742f201f467639f8356cf58756fb9f (patch)
treef87318909792045094c56ce9a5b2e471079b622c /drivers
parent09ea989e2bd2c3605068925f6ba2a7207948c6a4 (diff)
downloadblackbird-op-linux-8330f73fe9742f201f467639f8356cf58756fb9f.tar.gz
blackbird-op-linux-8330f73fe9742f201f467639f8356cf58756fb9f.zip
rocker: 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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/rocker/rocker_main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/rocker/rocker_main.c b/drivers/net/ethernet/rocker/rocker_main.c
index 2c5d3f5b84dd..786b158bd305 100644
--- a/drivers/net/ethernet/rocker/rocker_main.c
+++ b/drivers/net/ethernet/rocker/rocker_main.c
@@ -2189,6 +2189,9 @@ static int rocker_router_fib_event(struct notifier_block *nb,
struct rocker_fib_event_work *fib_work;
struct fib_notifier_info *info = ptr;
+ if (!net_eq(info->net, &init_net))
+ return NOTIFY_DONE;
+
if (info->family != AF_INET)
return NOTIFY_DONE;
OpenPOWER on IntegriCloud