summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2020-11-17 19:46:57 +0200
committerJakub Kicinski <kuba@kernel.org>2020-11-18 11:51:18 -0800
commitff8a24182acc4558a979f04e7030514e97e552be (patch)
tree90ef25971d828ec68af912b410120aa06529bfdb /drivers
parentfbf805bf1fcd125461541a171194f9dcdb2732d7 (diff)
downloadlwn-ff8a24182acc4558a979f04e7030514e97e552be.tar.gz
lwn-ff8a24182acc4558a979f04e7030514e97e552be.zip
mlxsw: spectrum_router: Set ifindex for IPv4 nexthops
The ifindex of the nexthop device was never set for IPv4 nexthops, unlike IPv6 nexthops. This went unnoticed since only IPv6 nexthops use it. Set the ifindex for IPv4 nexthops in order to be consistent with IPv6 and also because it will be used by a later patch. Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index 7dbf02f45913..1ea338786479 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -3971,6 +3971,7 @@ static int mlxsw_sp_nexthop4_init(struct mlxsw_sp *mlxsw_sp,
if (!dev)
return 0;
+ nh->ifindex = dev->ifindex;
rcu_read_lock();
in_dev = __in_dev_get_rcu(dev);