1
0
Fork 0

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>
alistair/sunxi64-5.4-dsi
Jiri Pirko 2019-09-04 09:40:47 +02:00 committed by David S. Miller
parent 09ea989e2b
commit 8330f73fe9
1 changed files with 3 additions and 0 deletions

View File

@ -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;