diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/xfrm.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index 786371365f2b..61b7504fc2ba 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1001,7 +1001,15 @@ static inline int xfrm_policy_id2dir(u32 index) | |||
1001 | 1001 | ||
1002 | static inline int xfrm_aevent_is_on(void) | 1002 | static inline int xfrm_aevent_is_on(void) |
1003 | { | 1003 | { |
1004 | return netlink_has_listeners(xfrm_nl,XFRMNLGRP_AEVENTS); | 1004 | struct sock *nlsk; |
1005 | int ret = 0; | ||
1006 | |||
1007 | rcu_read_lock(); | ||
1008 | nlsk = rcu_dereference(xfrm_nl); | ||
1009 | if (nlsk) | ||
1010 | ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS); | ||
1011 | rcu_read_unlock(); | ||
1012 | return ret; | ||
1005 | } | 1013 | } |
1006 | 1014 | ||
1007 | static inline void xfrm_aevent_doreplay(struct xfrm_state *x) | 1015 | static inline void xfrm_aevent_doreplay(struct xfrm_state *x) |