mlxsw: spectrum_router: Ignore address families other than IPv4
We're about to add IPv6 notifications in the FIB notification chain, but the driver currently doesn't support these, so ignore them. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
04b1d4e50e
commit
64e5e8252d
|
@ -3093,7 +3093,7 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb,
|
||||||
struct fib_notifier_info *info = ptr;
|
struct fib_notifier_info *info = ptr;
|
||||||
struct mlxsw_sp_router *router;
|
struct mlxsw_sp_router *router;
|
||||||
|
|
||||||
if (!net_eq(info->net, &init_net))
|
if (!net_eq(info->net, &init_net) || info->family != AF_INET)
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
|
|
||||||
fib_work = kzalloc(sizeof(*fib_work), GFP_ATOMIC);
|
fib_work = kzalloc(sizeof(*fib_work), GFP_ATOMIC);
|
||||||
|
|
Loading…
Reference in New Issue