summaryrefslogtreecommitdiff
path: root/net/socket.c
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@nvidia.com>2025-04-02 14:42:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-04-10 14:33:41 +0200
commitd10bd910d3a34ba48e90205ec0452498c1325d70 (patch)
tree907419546e270ccb562c8743df366226a97d3737 /net/socket.c
parent6d1e50a73de89a50554e168d2448b69e92fc71eb (diff)
downloadlinux-d10bd910d3a34ba48e90205ec0452498c1325d70.tar.gz
linux-d10bd910d3a34ba48e90205ec0452498c1325d70.tar.bz2
linux-d10bd910d3a34ba48e90205ec0452498c1325d70.zip
ipv6: Do not consider link down nexthops in path selection
[ Upstream commit 8b8e0dd357165e0258d9f9cdab5366720ed2f619 ] Nexthops whose link is down are not supposed to be considered during path selection when the "ignore_routes_with_linkdown" sysctl is set. This is done by assigning them a negative region boundary. However, when comparing the computed hash (unsigned) with the region boundary (signed), the negative region boundary is treated as unsigned, resulting in incorrect nexthop selection. Fix by treating the computed hash as signed. Note that the computed hash is always in range of [0, 2^31 - 1]. Fixes: 3d709f69a3e7 ("ipv6: Use hash-threshold instead of modulo-N") Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Link: https://patch.msgid.link/20250402114224.293392-3-idosch@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions