Files
linux/drivers/net/ethernet
Ido Schimmel e5ec6a2513 mlxsw: spectrum_router: Fix IPv4 nexthop gateway indication
mlxsw needs to distinguish nexthops with a gateway from connected
nexthops in order to write the former to the adjacency table of the
device. The check used to rely on the fact that nexthops with a gateway
have a 'link' scope whereas connected nexthops have a 'host' scope. This
is no longer correct after commit 747c143072 ("ip: fix dflt addr
selection for connected nexthop").

Fix that by instead checking the address family of the gateway IP. This
is a more direct way and also consistent with the IPv6 counterpart in
mlxsw_sp_rt6_is_gateway().

Cc: stable@vger.kernel.org
Fixes: 747c143072 ("ip: fix dflt addr selection for connected nexthop")
Fixes: 597cfe4fc3 ("nexthop: Add support for IPv4 nexthops")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2022-07-20 11:00:46 +01:00
..
2022-06-13 23:12:39 -07:00
2022-03-04 12:02:19 +00:00
2022-07-12 20:35:56 -07:00
2022-03-04 12:02:19 +00:00
2022-04-05 17:32:05 -07:00
2022-05-16 10:14:27 +01:00
2022-05-05 15:54:12 -07:00
2022-06-27 21:48:51 -07:00
2022-03-04 12:02:19 +00:00
2022-05-05 15:53:28 -07:00
2022-05-05 15:53:28 -07:00