]> 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)
commite07325b804ce1e20fab22000473248b08c143d28
treea206f909baa1ad283a1c88c43603672c97170781
parent646a26863817dd13d882c2a2a9b22f263357a1d6
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