]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: fix dflt policy check when there is no policy configured
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Mon, 22 Nov 2021 10:33:13 +0000 (11:33 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 23 Nov 2021 09:12:21 +0000 (10:12 +0100)
commit693b93c61bd98701adbbe13f118d1900cf5b7ecc
tree7e5f2223112fdc83da5e690edab1426750e527b1
parent30fbcd6f2051eaea2da968bcf009a4f8e3eca1ff
xfrm: fix dflt policy check when there is no policy configured

When there is no policy configured on the system, the default policy is
checked in xfrm_route_forward. However, it was done with the wrong
direction (XFRM_POLICY_FWD instead of XFRM_POLICY_OUT).
The default policy for XFRM_POLICY_FWD was checked just before, with a call
to xfrm[46]_policy_check().

CC: stable@vger.kernel.org
Fixes: 0ad336bd5de0 ("xfrm: Add possibility to set the default to block if we have no policy")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h