summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal2018-12-18 17:15:24 +0100
committerDavid S. Miller2018-12-19 20:21:37 +0100
commit26912e3756d0a13b188142d1ba0ab279cd3b657a (patch)
tree04001073156fcb35d51f4e232f550363b335b175
parentdrivers: net: netdevsim: use skb_sec_path helper (diff)
downloadkernel-qcow2-linux-26912e3756d0a13b188142d1ba0ab279cd3b657a.tar.gz
kernel-qcow2-linux-26912e3756d0a13b188142d1ba0ab279cd3b657a.tar.xz
kernel-qcow2-linux-26912e3756d0a13b188142d1ba0ab279cd3b657a.zip
xfrm: use secpath_exist where applicable
Will reduce noise when skb->sp is removed later in this series. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/xfrm.h2
-rw-r--r--net/xfrm/xfrm_interface.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index af723448c972..31220edcce95 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1185,7 +1185,7 @@ static inline int __xfrm_policy_check2(struct sock *sk, int dir,
if (sk && sk->sk_policy[XFRM_POLICY_IN])
return __xfrm_policy_check(sk, ndir, skb, family);
- return (!net->xfrm.policy_count[dir] && !skb->sp) ||
+ return (!net->xfrm.policy_count[dir] && !secpath_exists(skb)) ||
(skb_dst(skb)->flags & DST_NOPOLICY) ||
__xfrm_policy_check(sk, ndir, skb, family);
}
diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c
index d679fa0f44b3..6be8c7df15bb 100644
--- a/net/xfrm/xfrm_interface.c
+++ b/net/xfrm/xfrm_interface.c
@@ -251,7 +251,7 @@ static int xfrmi_rcv_cb(struct sk_buff *skb, int err)
struct xfrm_if *xi;
bool xnet;
- if (err && !skb->sp)
+ if (err && !secpath_exists(skb))
return 0;
x = xfrm_input_state(skb);