[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191204151714.20975-1-mgillott@vyatta.att-mail.com>
Date: Wed, 4 Dec 2019 15:17:14 +0000
From: Mark Gillott <mgillott@...tta.att-mail.com>
To: netdev@...r.kernel.org
Cc: steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
Mark Gillott <mgillott@...tta.att-mail.com>
Subject: [PATCH ipsec] xfrm: check DST_NOPOLICY as well as DST_NOXFRM
Before performing a policy bundle lookup, check the DST_NOPOLICY
option, as well as DST_NOXFRM. That is, skip further processing if
either of the disable_policy or disable_xfrm sysctl attributes are
set.
Signed-off-by: Mark Gillott <mgillott@...tta.att-mail.com>
---
net/xfrm/xfrm_policy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index f2d1e573ea55..a84df1da54d1 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -3075,7 +3075,7 @@ struct dst_entry *xfrm_lookup_with_ifid(struct net *net,
xflo.flags = flags;
/* To accelerate a bit... */
- if ((dst_orig->flags & DST_NOXFRM) ||
+ if ((dst_orig->flags & (DST_NOXFRM | DST_NOPOLICY)) ||
!net->xfrm.policy_count[XFRM_POLICY_OUT])
goto nopol;
--
2.17.1
Powered by blists - more mailing lists