• Home
  • Raw
  • Download

Lines Matching refs:sel

198 __xfrm4_selector_match(const struct xfrm_selector *sel, const struct flowi *fl)  in __xfrm4_selector_match()  argument
202 return addr4_match(fl4->daddr, sel->daddr.a4, sel->prefixlen_d) && in __xfrm4_selector_match()
203 addr4_match(fl4->saddr, sel->saddr.a4, sel->prefixlen_s) && in __xfrm4_selector_match()
204 !((xfrm_flowi_dport(fl, &fl4->uli) ^ sel->dport) & sel->dport_mask) && in __xfrm4_selector_match()
205 !((xfrm_flowi_sport(fl, &fl4->uli) ^ sel->sport) & sel->sport_mask) && in __xfrm4_selector_match()
206 (fl4->flowi4_proto == sel->proto || !sel->proto) && in __xfrm4_selector_match()
207 (fl4->flowi4_oif == sel->ifindex || !sel->ifindex); in __xfrm4_selector_match()
211 __xfrm6_selector_match(const struct xfrm_selector *sel, const struct flowi *fl) in __xfrm6_selector_match() argument
215 return addr_match(&fl6->daddr, &sel->daddr, sel->prefixlen_d) && in __xfrm6_selector_match()
216 addr_match(&fl6->saddr, &sel->saddr, sel->prefixlen_s) && in __xfrm6_selector_match()
217 !((xfrm_flowi_dport(fl, &fl6->uli) ^ sel->dport) & sel->dport_mask) && in __xfrm6_selector_match()
218 !((xfrm_flowi_sport(fl, &fl6->uli) ^ sel->sport) & sel->sport_mask) && in __xfrm6_selector_match()
219 (fl6->flowi6_proto == sel->proto || !sel->proto) && in __xfrm6_selector_match()
220 (fl6->flowi6_oif == sel->ifindex || !sel->ifindex); in __xfrm6_selector_match()
223 bool xfrm_selector_match(const struct xfrm_selector *sel, const struct flowi *fl, in xfrm_selector_match() argument
228 return __xfrm4_selector_match(sel, fl); in xfrm_selector_match()
230 return __xfrm6_selector_match(sel, fl); in xfrm_selector_match()
484 const struct xfrm_selector *sel, in policy_hash_bysel() argument
493 hash = __sel_hash(sel, family, hmask, dbits, sbits); in policy_hash_bysel()
1621 u32 if_id, u8 type, int dir, struct xfrm_selector *sel, in __xfrm_policy_bysel_ctx() argument
1633 !selector_cmp(sel, &pol->selector) && in __xfrm_policy_bysel_ctx()
1643 u8 type, int dir, struct xfrm_selector *sel, in xfrm_policy_bysel_ctx() argument
1652 chain = policy_hash_bysel(net, sel, sel->family, dir); in xfrm_policy_bysel_ctx()
1658 sel->family, dir, if_id); in xfrm_policy_bysel_ctx()
1665 &sel->saddr, in xfrm_policy_bysel_ctx()
1666 &sel->daddr)) { in xfrm_policy_bysel_ctx()
1677 sel, ctx); in xfrm_policy_bysel_ctx()
1686 sel, ctx); in xfrm_policy_bysel_ctx()
1894 const struct xfrm_selector *sel = &pol->selector; in xfrm_policy_match() local
1904 match = xfrm_selector_match(sel, fl, family); in xfrm_policy_match()
2582 if (xfrm[i]->sel.family == AF_UNSPEC) { in xfrm_bundle_create()
3560 if (!xfrm_selector_match(&x->sel, &fl, family)) { in __xfrm_policy_check()
4194 struct xfrm_selector *sel = &xp->selector; in xfrm_audit_common_policyinfo() local
4200 switch (sel->family) { in xfrm_audit_common_policyinfo()
4202 audit_log_format(audit_buf, " src=%pI4", &sel->saddr.a4); in xfrm_audit_common_policyinfo()
4203 if (sel->prefixlen_s != 32) in xfrm_audit_common_policyinfo()
4205 sel->prefixlen_s); in xfrm_audit_common_policyinfo()
4206 audit_log_format(audit_buf, " dst=%pI4", &sel->daddr.a4); in xfrm_audit_common_policyinfo()
4207 if (sel->prefixlen_d != 32) in xfrm_audit_common_policyinfo()
4209 sel->prefixlen_d); in xfrm_audit_common_policyinfo()
4212 audit_log_format(audit_buf, " src=%pI6", sel->saddr.a6); in xfrm_audit_common_policyinfo()
4213 if (sel->prefixlen_s != 128) in xfrm_audit_common_policyinfo()
4215 sel->prefixlen_s); in xfrm_audit_common_policyinfo()
4216 audit_log_format(audit_buf, " dst=%pI6", sel->daddr.a6); in xfrm_audit_common_policyinfo()
4217 if (sel->prefixlen_d != 128) in xfrm_audit_common_policyinfo()
4219 sel->prefixlen_d); in xfrm_audit_common_policyinfo()
4276 static struct xfrm_policy *xfrm_migrate_policy_find(const struct xfrm_selector *sel, in xfrm_migrate_policy_find() argument
4284 chain = policy_hash_direct(net, &sel->daddr, &sel->saddr, sel->family, dir); in xfrm_migrate_policy_find()
4287 xfrm_migrate_selector_match(sel, &pol->selector) && in xfrm_migrate_policy_find()
4300 xfrm_migrate_selector_match(sel, &pol->selector) && in xfrm_migrate_policy_find()
4413 int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type, in xfrm_migrate() argument
4435 if ((pol = xfrm_migrate_policy_find(sel, dir, type, net, if_id)) == NULL) { in xfrm_migrate()
4467 km_migrate(sel, dir, type, m, num_migrate, k, encap); in xfrm_migrate()