Lines Matching refs:xfrm_policy
62 static void __xfrm_policy_link(struct xfrm_policy *pol, int dir);
63 static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol,
66 static inline bool xfrm_pol_hold_rcu(struct xfrm_policy *policy) in xfrm_pol_hold_rcu()
190 struct xfrm_policy *xp = (struct xfrm_policy *)data; in xfrm_policy_timer()
262 struct xfrm_policy *xfrm_policy_alloc(struct net *net, gfp_t gfp) in xfrm_policy_alloc()
264 struct xfrm_policy *policy; in xfrm_policy_alloc()
266 policy = kzalloc(sizeof(struct xfrm_policy), gfp); in xfrm_policy_alloc()
287 struct xfrm_policy *policy = container_of(head, struct xfrm_policy, rcu); in xfrm_policy_destroy_rcu()
295 void xfrm_policy_destroy(struct xfrm_policy *policy) in xfrm_policy_destroy()
310 static void xfrm_policy_kill(struct xfrm_policy *policy) in xfrm_policy_kill()
400 struct xfrm_policy *pol; in xfrm_dst_hash_transfer()
435 struct xfrm_policy *pol; in xfrm_idx_hash_transfer()
573 struct xfrm_policy *pol; in xfrm_hash_rebuild()
574 struct xfrm_policy *policy; in xfrm_hash_rebuild()
661 struct xfrm_policy *p; in xfrm_gen_index()
703 static void xfrm_policy_requeue(struct xfrm_policy *old, in xfrm_policy_requeue()
704 struct xfrm_policy *new) in xfrm_policy_requeue()
730 static bool xfrm_policy_mark_match(struct xfrm_policy *policy, in xfrm_policy_mark_match()
731 struct xfrm_policy *pol) in xfrm_policy_mark_match()
745 int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl) in xfrm_policy_insert()
748 struct xfrm_policy *pol; in xfrm_policy_insert()
749 struct xfrm_policy *delpol; in xfrm_policy_insert()
811 struct xfrm_policy *xfrm_policy_bysel_ctx(struct net *net, u32 mark, u32 if_id, in xfrm_policy_bysel_ctx()
817 struct xfrm_policy *pol, *ret; in xfrm_policy_bysel_ctx()
852 struct xfrm_policy *xfrm_policy_byid(struct net *net, u32 mark, u32 if_id, in xfrm_policy_byid()
856 struct xfrm_policy *pol, *ret; in xfrm_policy_byid()
900 struct xfrm_policy *pol; in xfrm_policy_flush_secctx_check()
950 struct xfrm_policy *pol; in xfrm_policy_flush()
999 int (*func)(struct xfrm_policy *, int, int, void*), in xfrm_policy_walk() argument
1002 struct xfrm_policy *pol; in xfrm_policy_walk()
1023 pol = container_of(x, struct xfrm_policy, walk); in xfrm_policy_walk()
1071 static int xfrm_policy_match(const struct xfrm_policy *pol, in xfrm_policy_match()
1093 static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type, in xfrm_policy_lookup_bytype()
1099 struct xfrm_policy *pol, *ret; in xfrm_policy_lookup_bytype()
1164 static struct xfrm_policy *xfrm_policy_lookup(struct net *net, in xfrm_policy_lookup()
1169 struct xfrm_policy *pol; in xfrm_policy_lookup()
1180 static struct xfrm_policy *xfrm_sk_policy_lookup(const struct sock *sk, int dir, in xfrm_sk_policy_lookup()
1184 struct xfrm_policy *pol; in xfrm_sk_policy_lookup()
1224 static void __xfrm_policy_link(struct xfrm_policy *pol, int dir) in __xfrm_policy_link()
1233 static struct xfrm_policy *__xfrm_policy_unlink(struct xfrm_policy *pol, in __xfrm_policy_unlink()
1253 static void xfrm_sk_policy_link(struct xfrm_policy *pol, int dir) in xfrm_sk_policy_link()
1258 static void xfrm_sk_policy_unlink(struct xfrm_policy *pol, int dir) in xfrm_sk_policy_unlink()
1263 int xfrm_policy_delete(struct xfrm_policy *pol, int dir) in xfrm_policy_delete()
1278 int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol) in xfrm_sk_policy_insert()
1281 struct xfrm_policy *old_pol; in xfrm_sk_policy_insert()
1314 static struct xfrm_policy *clone_policy(const struct xfrm_policy *old, int dir) in clone_policy()
1316 struct xfrm_policy *newp = xfrm_policy_alloc(xp_net(old), GFP_ATOMIC); in clone_policy()
1348 const struct xfrm_policy *p; in __xfrm_sk_clone_policy()
1349 struct xfrm_policy *np; in __xfrm_sk_clone_policy()
1385 xfrm_tmpl_resolve_one(struct xfrm_policy *policy, const struct flowi *fl, in xfrm_tmpl_resolve_one()
1444 xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, const struct flowi *fl, in xfrm_tmpl_resolve()
1571 static struct dst_entry *xfrm_bundle_create(struct xfrm_policy *policy, in xfrm_bundle_create()
1701 struct xfrm_policy **pols, in xfrm_expand_policies()
1746 xfrm_resolve_and_create_bundle(struct xfrm_policy **pols, int num_pols, in xfrm_resolve_and_create_bundle()
1776 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_resolve_and_create_bundle()
1787 struct xfrm_policy *pol = (struct xfrm_policy *)arg; in xfrm_policy_queue_process()
1863 struct xfrm_policy *pol = xdst->pols[0]; in xdst_queue_output()
1964 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; in xfrm_bundle_lookup()
2011 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_bundle_lookup()
2053 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; in xfrm_lookup_with_ifid()
2122 memcpy(pols, xdst->pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_lookup_with_ifid()
2327 struct xfrm_policy *pol; in __xfrm_policy_check()
2328 struct xfrm_policy *pols[XFRM_POLICY_TYPE_MAX]; in __xfrm_policy_check()
2964 static void xfrm_audit_common_policyinfo(struct xfrm_policy *xp, in xfrm_audit_common_policyinfo()
2998 void xfrm_audit_policy_add(struct xfrm_policy *xp, int result, bool task_valid) in xfrm_audit_policy_add()
3012 void xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, in xfrm_audit_policy_delete()
3050 static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_selector *sel, in xfrm_migrate_policy_find()
3053 struct xfrm_policy *pol, *ret = NULL; in xfrm_migrate_policy_find()
3116 static int xfrm_policy_migrate(struct xfrm_policy *pol, in xfrm_policy_migrate()
3191 struct xfrm_policy *pol = NULL; in xfrm_migrate()