]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Only provide MAC address for valid nexthops
authorIdo Schimmel <idosch@nvidia.com>
Mon, 22 Mar 2021 15:58:44 +0000 (17:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 20:45:46 +0000 (13:45 -0700)
commitc6a5011bec0962cfddcce48065e29c65e9a6ec18
treea206f909baa1ad283a1c88c43603672c97170781
parent26df5acc275b8b5fb14de1301feed6697f2433cf
mlxsw: spectrum_router: Only provide MAC address for valid nexthops

The helper returns the MAC address associated with the nexthop. It is
only valid when the nexthop forwards packets and when it is an Ethernet
nexthop. Reflect this in the checks the helper is performing.

This is not an issue because the sole caller of the function only
invokes it for such nexthops.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c