Skip to content

Commit 8e29f97

Browse files
idoschdavem330
authored andcommitted
mlxsw: spectrum_router: Only handle IPv4 and IPv6 events
The driver doesn't support events from address families other than IPv4 and IPv6, so ignore them. Otherwise, we risk queueing a work item before it's initialized. This can happen in case a VRF is configured when MROUTE_MULTIPLE_TABLES is enabled, as the VRF driver will try to add an l3mdev rule for the IPMR family. Fixes: 65e65ec ("mlxsw: spectrum_router: Don't ignore IPv6 notifications") Signed-off-by: Ido Schimmel <[email protected]> Reported-by: Andreas Rammhold <[email protected]> Reported-by: Florian Klink <[email protected]> Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2130c02 commit 8e29f97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4868,7 +4868,8 @@ static int mlxsw_sp_router_fib_event(struct notifier_block *nb,
48684868
struct fib_notifier_info *info = ptr;
48694869
struct mlxsw_sp_router *router;
48704870

4871-
if (!net_eq(info->net, &init_net))
4871+
if (!net_eq(info->net, &init_net) ||
4872+
(info->family != AF_INET && info->family != AF_INET6))
48724873
return NOTIFY_DONE;
48734874

48744875
fib_work = kzalloc(sizeof(*fib_work), GFP_ATOMIC);

0 commit comments

Comments
 (0)