]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Use nexthop's scope to set action type
authorIdo Schimmel <idosch@mellanox.com>
Wed, 8 Feb 2017 10:16:31 +0000 (11:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Feb 2017 20:25:16 +0000 (15:25 -0500)
commit87976b3b939a39dacdfde7ea3857a0b33d017e9b
tree762a126a1ae02716822d3bf912c763e3c69bb088
parent01229e02aede185903614716fe7cc81fc460be64
mlxsw: spectrum_router: Use nexthop's scope to set action type

We currently use the scope of the FIB info to distinguish between a
direct unicast route and a gatewayed one. However, the kernel is
perfectly happy to configure a route with scope UNIVERSE to a directly
connected network.

Instead, we can rely on the first nexthop's scope to check if the route
is gatewayed or not.

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