]> 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>
Tue, 14 Feb 2023 18:11:43 +0000 (19:11 +0100)
commita50f4278ca7feedc102fca24267dcf470b9dc65a
tree1d37a328b93fa45ba44e57ff429801285414fbbe
parent942f995b6e171d2e67ad6271fa868f7a66bebecf
xfrm: fix bug with DSCP copy to v6 from v4 tunnel

[ Upstream commit 420e714e2c80b9fa7750253bcccc3c65672b28d9 ]

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