mlxsw: spectrum_router: Ignore address families other than IPv4
authorIdo Schimmel <idosch@mellanox.com>
Thu, 3 Aug 2017 11:28:12 +0000 (13:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Aug 2017 22:35:59 +0000 (15:35 -0700)
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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

index b79f9b67f28555a1af6f9e9873c8da7479ed9bed..78c19512250dea04883479a61c1e683e1313d6da 100644 (file)
@@ -3093,7 +3093,7 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb,
        struct fib_notifier_info *info = ptr;
        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;
 
        fib_work = kzalloc(sizeof(*fib_work), GFP_ATOMIC);