WSL2-Linux-Kernel/net/xfrm
Guillaume Nault 786e608e97 xfrm: Don't accidentally set RTO_ONLINK in decode_session4()
commit 23e7b1bfed upstream.

Similar to commit 94e2238969 ("xfrm4: strip ECN bits from tos field"),
clear the ECN bits from iph->tos when setting ->flowi4_tos.
This ensures that the last bit of ->flowi4_tos is cleared, so
ip_route_output_key_hash() isn't going to restrict the scope of the
route lookup.

Use ~INET_ECN_MASK instead of IPTOS_RT_MASK, because we have no reason
to clear the high order bits.

Found by code inspection, compile tested only.

Fixes: 4da3089f2b ("[IPSEC]: Use TOS when doing tunnel lookups")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-01-27 11:05:36 +01:00
..
Kconfig
Makefile
espintcp.c
xfrm_algo.c
xfrm_compat.c xfrm: rate limit SA mapping change message to user space 2022-01-27 11:04:49 +01:00
xfrm_device.c
xfrm_hash.c
xfrm_hash.h
xfrm_inout.h
xfrm_input.c
xfrm_interface.c xfrm: interface with if_id 0 should return error 2022-01-27 11:03:40 +01:00
xfrm_ipcomp.c
xfrm_output.c net/xfrm: IPsec tunnel mode fix inner_ipproto setting in sec_path 2022-01-27 11:03:49 +01:00
xfrm_policy.c xfrm: Don't accidentally set RTO_ONLINK in decode_session4() 2022-01-27 11:05:36 +01:00
xfrm_proc.c
xfrm_replay.c
xfrm_state.c xfrm: rate limit SA mapping change message to user space 2022-01-27 11:04:49 +01:00
xfrm_sysctl.c
xfrm_user.c xfrm: rate limit SA mapping change message to user space 2022-01-27 11:04:49 +01:00