aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index bd2515005ae2..e027179e8199 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -48,7 +48,6 @@ DECLARE_SNMP_STAT(struct linux_xfrm_mib, xfrm_statistics);
48#define XFRM_INC_STATS_USER(field) 48#define XFRM_INC_STATS_USER(field)
49#endif 49#endif
50 50
51extern struct sock *xfrm_nl;
52extern u32 sysctl_xfrm_aevent_etime; 51extern u32 sysctl_xfrm_aevent_etime;
53extern u32 sysctl_xfrm_aevent_rseqth; 52extern u32 sysctl_xfrm_aevent_rseqth;
54extern int sysctl_xfrm_larval_drop; 53extern int sysctl_xfrm_larval_drop;
@@ -1516,18 +1515,20 @@ static inline int xfrm_policy_id2dir(u32 index)
1516 return index & 7; 1515 return index & 7;
1517} 1516}
1518 1517
1519static inline int xfrm_aevent_is_on(void) 1518#ifdef CONFIG_XFRM
1519static inline int xfrm_aevent_is_on(struct net *net)
1520{ 1520{
1521 struct sock *nlsk; 1521 struct sock *nlsk;
1522 int ret = 0; 1522 int ret = 0;
1523 1523
1524 rcu_read_lock(); 1524 rcu_read_lock();
1525 nlsk = rcu_dereference(xfrm_nl); 1525 nlsk = rcu_dereference(net->xfrm.nlsk);
1526 if (nlsk) 1526 if (nlsk)
1527 ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS); 1527 ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS);
1528 rcu_read_unlock(); 1528 rcu_read_unlock();
1529 return ret; 1529 return ret;
1530} 1530}
1531#endif
1531 1532
1532static inline int xfrm_alg_len(struct xfrm_algo *alg) 1533static inline int xfrm_alg_len(struct xfrm_algo *alg)
1533{ 1534{