Commit 8330f73f authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller
Browse files

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: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09ea989e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;