diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2008-11-26 02:38:20 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-26 02:38:20 +0100 |
commit | a6483b790f8efcd8db190c1c0ff93f9d9efe919a (patch) | |
tree | e05ba1d3e7014409a69d878bf9f24c5eb93365e4 /include/net/xfrm.h | |
parent | netns xfrm: xfrm_input() fixup (diff) | |
download | linux-a6483b790f8efcd8db190c1c0ff93f9d9efe919a.tar.xz linux-a6483b790f8efcd8db190c1c0ff93f9d9efe919a.zip |
netns xfrm: per-netns NETLINK_XFRM socket
Stub senders to init_net's one temporarily.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 7 |
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); #define XFRM_INC_STATS_USER(field) #endif -extern struct sock *xfrm_nl; extern u32 sysctl_xfrm_aevent_etime; extern u32 sysctl_xfrm_aevent_rseqth; extern int sysctl_xfrm_larval_drop; @@ -1516,18 +1515,20 @@ static inline int xfrm_policy_id2dir(u32 index) return index & 7; } -static inline int xfrm_aevent_is_on(void) +#ifdef CONFIG_XFRM +static inline int xfrm_aevent_is_on(struct net *net) { struct sock *nlsk; int ret = 0; rcu_read_lock(); - nlsk = rcu_dereference(xfrm_nl); + nlsk = rcu_dereference(net->xfrm.nlsk); if (nlsk) ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS); rcu_read_unlock(); return ret; } +#endif static inline int xfrm_alg_len(struct xfrm_algo *alg) { |