]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: fix bug with DSCP copy to v6 from v4 tunnel
authorChristian Hopps <chopps@chopps.org>
Thu, 26 Jan 2023 16:33:50 +0000 (11:33 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Feb 2023 11:50:31 +0000 (12:50 +0100)
commit6bcab1981e52c93666b6200ea51ac847d23efd57
tree7a412b27a70accc76f89639abaf859f140fc9eed
parent5a75dd6fbfe34785ec2fe6751a480338ef764690
xfrm: fix bug with DSCP copy to v6 from v4 tunnel

[ Upstream commit 6028da3f125fec34425dbd5fec18e85d372b2af6 ]

When copying the DSCP bits for decap-dscp into IPv6 don't assume the
outer encap is always IPv6. Instead, as with the inner IPv4 case, copy
the DSCP bits from the correctly saved "tos" value in the control block.

Fixes: 9aba4012a815 ("[IPSEC]: Separate inner/outer mode processing on input")
Signed-off-by: Christian Hopps <chopps@chopps.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/xfrm/xfrm_input.c