Lines Matching refs:xfrm_policy

174 static void __xfrm_policy_link(struct xfrm_policy *pol, int dir);
175 static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
185 static struct xfrm_policy *
186 xfrm_policy_insert_list(struct hlist_head *chain, struct xfrm_policy *policy,
189 struct xfrm_policy *policy);
197 static inline bool xfrm_pol_hold_rcu(struct xfrm_policy *policy) in xfrm_pol_hold_rcu()
321 struct xfrm_policy *xp = from_timer(xp, t, timer); in xfrm_policy_timer()
393 struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp) in xfrm_policy_alloc()
395 struct xfrm_policy *policy; in xfrm_policy_alloc()
397 policy = kzalloc(sizeof(struct xfrm_policy), gfp); in xfrm_policy_alloc()
418 struct xfrm_policy *policy = container_of(head, struct xfrm_policy, rcu); in xfrm_policy_destroy_rcu()
426 void xfrm_policy_destroy(struct xfrm_policy *policy) in xfrm_policy_destroy()
441 static void xfrm_policy_kill(struct xfrm_policy *policy) in xfrm_policy_kill()
531 struct xfrm_policy *pol; in xfrm_dst_hash_transfer()
566 struct xfrm_policy *pol; in xfrm_idx_hash_transfer()
701 xfrm_policy_inexact_alloc_bin(const struct xfrm_policy *pol, u8 dir) in xfrm_policy_inexact_alloc_bin()
759 xfrm_policy_inexact_insert_use_any_list(const struct xfrm_policy *policy) in xfrm_policy_inexact_insert_use_any_list()
849 struct xfrm_policy *policy, *p; in xfrm_policy_inexact_list_reinsert()
937 struct xfrm_policy *tmp; in xfrm_policy_inexact_node_reinsert()
971 struct xfrm_policy *tmp; in xfrm_policy_inexact_node_merge()
1132 struct xfrm_policy *policy, u8 dir) in xfrm_policy_inexact_alloc_chain()
1190 static struct xfrm_policy *
1191 xfrm_policy_inexact_insert(struct xfrm_policy *policy, u8 dir, int excl) in xfrm_policy_inexact_insert()
1194 struct xfrm_policy *delpol; in xfrm_policy_inexact_insert()
1231 struct xfrm_policy *pol; in xfrm_hash_rebuild()
1232 struct xfrm_policy *policy; in xfrm_hash_rebuild()
1383 struct xfrm_policy *p; in xfrm_gen_index()
1425 static void xfrm_policy_requeue(struct xfrm_policy *old, in xfrm_policy_requeue()
1426 struct xfrm_policy *new) in xfrm_policy_requeue()
1453 struct xfrm_policy *pol) in xfrm_policy_mark_match()
1508 struct xfrm_policy *policy) in xfrm_policy_insert_inexact_list()
1510 struct xfrm_policy *pol, *delpol = NULL; in xfrm_policy_insert_inexact_list()
1543 static struct xfrm_policy *xfrm_policy_insert_list(struct hlist_head *chain, in xfrm_policy_insert_list()
1544 struct xfrm_policy *policy, in xfrm_policy_insert_list()
1547 struct xfrm_policy *pol, *newpos = NULL, *delpol = NULL; in xfrm_policy_insert_list()
1577 int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) in xfrm_policy_insert()
1580 struct xfrm_policy *delpol; in xfrm_policy_insert()
1624 static struct xfrm_policy *
1629 struct xfrm_policy *pol; in __xfrm_policy_bysel_ctx()
1646 struct xfrm_policy *
1652 struct xfrm_policy *pol, *ret = NULL; in xfrm_policy_bysel_ctx()
1678 struct xfrm_policy *tmp; in xfrm_policy_bysel_ctx()
1716 struct xfrm_policy *
1720 struct xfrm_policy *pol, *ret; in xfrm_policy_byid()
1760 struct xfrm_policy *pol; in xfrm_policy_flush_secctx_check()
1788 struct xfrm_policy *pol; in xfrm_policy_flush()
1823 int (*func)(struct xfrm_policy *, int, int, void*), in xfrm_policy_walk() argument
1826 struct xfrm_policy *pol; in xfrm_policy_walk()
1847 pol = container_of(x, struct xfrm_policy, walk); in xfrm_policy_walk()
1895 static int xfrm_policy_match(const struct xfrm_policy *pol, in xfrm_policy_match()
2019 static struct xfrm_policy *
2021 struct xfrm_policy *prefer, in __xfrm_policy_eval_candidates()
2026 struct xfrm_policy *pol; in __xfrm_policy_eval_candidates()
2058 static struct xfrm_policy *
2060 struct xfrm_policy *prefer, in xfrm_policy_eval_candidates()
2064 struct xfrm_policy *tmp; in xfrm_policy_eval_candidates()
2083 static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type, in xfrm_policy_lookup_bytype()
2091 struct xfrm_policy *pol, *ret; in xfrm_policy_lookup_bytype()
2148 static struct xfrm_policy *xfrm_policy_lookup(struct net *net, in xfrm_policy_lookup()
2153 struct xfrm_policy *pol; in xfrm_policy_lookup()
2164 static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir, in xfrm_sk_policy_lookup()
2168 struct xfrm_policy *pol; in xfrm_sk_policy_lookup()
2208 static void __xfrm_policy_link(struct xfrm_policy *pol, int dir) in __xfrm_policy_link()
2217 static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol, in __xfrm_policy_unlink()
2238 static void xfrm_sk_policy_link(struct xfrm_policy *pol, int dir) in xfrm_sk_policy_link()
2243 static void xfrm_sk_policy_unlink(struct xfrm_policy *pol, int dir) in xfrm_sk_policy_unlink()
2248 int xfrm_policy_delete(struct xfrm_policy *pol, int dir) in xfrm_policy_delete()
2263 int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) in xfrm_sk_policy_insert()
2266 struct xfrm_policy *old_pol; in xfrm_sk_policy_insert()
2299 static struct xfrm_policy *clone_policy(const struct xfrm_policy *old, int dir) in clone_policy()
2301 struct xfrm_policy *newp = xfrm_policy_alloc(xp_net(old), GFP_ATOMIC); in clone_policy()
2333 const struct xfrm_policy *p; in __xfrm_sk_clone_policy()
2334 struct xfrm_policy *np; in __xfrm_sk_clone_policy()
2370 xfrm_tmpl_resolve_one(struct xfrm_policy *policy, const struct flowi *fl, in xfrm_tmpl_resolve_one()
2429 xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl, in xfrm_tmpl_resolve()
2541 static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, in xfrm_bundle_create()
2678 struct xfrm_policy **pols, in xfrm_expand_policies()
2726 xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols, in xfrm_resolve_and_create_bundle()
2757 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_resolve_and_create_bundle()
2768 struct xfrm_policy *pol = from_timer(pol, t, polq.hold_timer); in xfrm_policy_queue_process()
2855 struct xfrm_policy *pol = xdst->pols[0]; in xdst_queue_output()
2956 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; in xfrm_bundle_lookup()
3003 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_bundle_lookup()
3045 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; in xfrm_lookup_with_ifid()
3114 memcpy(pols, xdst->pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_lookup_with_ifid()
3551 struct xfrm_policy *pol; in __xfrm_policy_check()
3552 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; in __xfrm_policy_check()
4212 static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp, in xfrm_audit_common_policyinfo()
4246 void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, bool task_valid) in xfrm_audit_policy_add()
4260 void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, in xfrm_audit_policy_delete()
4298 static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_selector *sel, in xfrm_migrate_policy_find()
4301 struct xfrm_policy *pol, *ret = NULL; in xfrm_migrate_policy_find()
4366 static int xfrm_policy_migrate(struct xfrm_policy *pol, in xfrm_policy_migrate()
4441 struct xfrm_policy *pol = NULL; in xfrm_migrate()