diff options
author | Ido Schimmel <idosch@nvidia.com> | 2020-11-17 19:47:02 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-18 11:51:18 -0800 |
commit | a9a711a3f78ba38badd32d1a06f844bc44863840 (patch) | |
tree | 1eda8c6ebbd4c645d8a9f390d504b69cf3e724c5 /drivers/net | |
parent | 5b9954e1e7b839ac6a5a773cb498884dd4f947f1 (diff) | |
download | linux-a9a711a3f78ba38badd32d1a06f844bc44863840.tar.bz2 |
mlxsw: spectrum_router: Only clear offload indication from valid IPv6 FIB info
When the IPv6 FIB info has a nexthop object, the nexthop offload
indication is set on the nexthop object and not on the FIB info itself.
Therefore, do not try to clear the offload indication from the FIB info
when it has a nexthop object.
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/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 49cd6eba0661..645ec70314d2 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -5324,7 +5324,8 @@ static void mlxsw_sp_rt6_destroy(struct mlxsw_sp_rt6 *mlxsw_sp_rt6) { struct fib6_nh *fib6_nh = mlxsw_sp_rt6->rt->fib6_nh; - fib6_nh->fib_nh_flags &= ~RTNH_F_OFFLOAD; + if (!mlxsw_sp_rt6->rt->nh) + fib6_nh->fib_nh_flags &= ~RTNH_F_OFFLOAD; mlxsw_sp_rt6_release(mlxsw_sp_rt6->rt); kfree(mlxsw_sp_rt6); } |