diff options
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r-- | include/net/xfrm.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index afa5730fb3bd..5313ccfdeedf 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -594,6 +594,7 @@ struct xfrm_mgr { | |||
594 | const struct xfrm_migrate *m, | 594 | const struct xfrm_migrate *m, |
595 | int num_bundles, | 595 | int num_bundles, |
596 | const struct xfrm_kmaddress *k); | 596 | const struct xfrm_kmaddress *k); |
597 | bool (*is_alive)(const struct km_event *c); | ||
597 | }; | 598 | }; |
598 | 599 | ||
599 | int xfrm_register_km(struct xfrm_mgr *km); | 600 | int xfrm_register_km(struct xfrm_mgr *km); |
@@ -1646,6 +1647,20 @@ static inline int xfrm_aevent_is_on(struct net *net) | |||
1646 | rcu_read_unlock(); | 1647 | rcu_read_unlock(); |
1647 | return ret; | 1648 | return ret; |
1648 | } | 1649 | } |
1650 | |||
1651 | static inline int xfrm_acquire_is_on(struct net *net) | ||
1652 | { | ||
1653 | struct sock *nlsk; | ||
1654 | int ret = 0; | ||
1655 | |||
1656 | rcu_read_lock(); | ||
1657 | nlsk = rcu_dereference(net->xfrm.nlsk); | ||
1658 | if (nlsk) | ||
1659 | ret = netlink_has_listeners(nlsk, XFRMNLGRP_ACQUIRE); | ||
1660 | rcu_read_unlock(); | ||
1661 | |||
1662 | return ret; | ||
1663 | } | ||
1649 | #endif | 1664 | #endif |
1650 | 1665 | ||
1651 | static inline int xfrm_alg_len(const struct xfrm_algo *alg) | 1666 | static inline int xfrm_alg_len(const struct xfrm_algo *alg) |