ipv4: Set correct scope in inet_csk_route_*().
authorGuillaume Nault <gnault@redhat.com>
Mon, 5 Jun 2023 21:55:25 +0000 (23:55 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 7 Jun 2023 04:13:03 +0000 (21:13 -0700)
commit4b095281cacab0b62e7f11d6d8c4a6d49ecaae42
tree9a244109d54982c399da4b996deae51b3c27c7e2
parentfe109f6b6378a7d26231474ca0acb7d028cbaa70
ipv4: Set correct scope in inet_csk_route_*().

RT_CONN_FLAGS(sk) overloads the tos parameter with the RTO_ONLINK bit
when sk has the SOCK_LOCALROUTE flag set. This is only useful for
ip_route_output_key_hash() to eventually adjust the route scope.

Let's drop RTO_ONLINK and set the correct scope directly to avoid this
special case in the future and to allow converting ->flowi4_tos to
dscp_t.

Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/inet_connection_sock.c