Skip to content

Commit

Permalink
rocker: add missing init_net check in FIB notifier
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Pirko authored and David S. Miller committed Sep 5, 2019
1 parent 09ea989 commit 8330f73
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/rocker/rocker_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8330f73

Please sign in to comment.