xfrm: Unmask upper DSCP bits in xfrm_get_tos()
authorIdo Schimmel <idosch@nvidia.com>
Thu, 29 Aug 2024 06:54:54 +0000 (09:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 31 Aug 2024 16:44:51 +0000 (17:44 +0100)
commitb261b2c6c18bcb81d69de011fd991bdfb97259f7
tree5c70219d9a68b064046def38c5be2dcaef3a8b1c
parentf6c89e95555ace0cb10d01b07756bfa5db5ee7fa
xfrm: Unmask upper DSCP bits in xfrm_get_tos()

The function returns a value that is used to initialize 'flowi4_tos'
before being passed to the FIB lookup API in the following call chain:

xfrm_bundle_create()
tos = xfrm_get_tos(fl, family)
xfrm_dst_lookup(..., tos, ...)
__xfrm_dst_lookup(..., tos, ...)
xfrm4_dst_lookup(..., tos, ...)
__xfrm4_dst_lookup(..., tos, ...)
fl4->flowi4_tos = tos
__ip_route_output_key(net, fl4)

Unmask the upper DSCP bits so that in the future the output route lookup
could be performed according to the full DSCP value.

Remove IPTOS_RT_MASK since it is no longer used.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/route.h
net/xfrm/xfrm_policy.c