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)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 30 Jan 2023 10:31:58 +0000 (11:31 +0100)
commit6028da3f125fec34425dbd5fec18e85d372b2af6
tree00bb040bef0f0405cfc3b7c17bc965fcfd2b81ac
parent0a9e5794b21e2d1303759ff8fe5f9215db7757ba
xfrm: fix bug with DSCP copy to v6 from v4 tunnel

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: 227620e29509 ("[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>
net/xfrm/xfrm_input.c