aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r--net/xfrm/xfrm_state.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 3da89c01ea71..a26ef6952c30 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1055,6 +1055,25 @@ void km_policy_expired(struct xfrm_policy *pol, int dir, int hard, u32 pid)
1055} 1055}
1056EXPORT_SYMBOL(km_policy_expired); 1056EXPORT_SYMBOL(km_policy_expired);
1057 1057
1058int km_report(u8 proto, struct xfrm_selector *sel, xfrm_address_t *addr)
1059{
1060 int err = -EINVAL;
1061 int ret;
1062 struct xfrm_mgr *km;
1063
1064 read_lock(&xfrm_km_lock);
1065 list_for_each_entry(km, &xfrm_km_list, list) {
1066 if (km->report) {
1067 ret = km->report(proto, sel, addr);
1068 if (!ret)
1069 err = ret;
1070 }
1071 }
1072 read_unlock(&xfrm_km_lock);
1073 return err;
1074}
1075EXPORT_SYMBOL(km_report);
1076
1058int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen) 1077int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen)
1059{ 1078{
1060 int err; 1079 int err;