• Home
  • Raw
  • Download

Lines Matching refs:family

88 			 unsigned short family)  in xfrm_selector_match()  argument
90 switch (family) { in xfrm_selector_match()
99 static struct xfrm_policy_afinfo *xfrm_policy_get_afinfo(unsigned short family) in xfrm_policy_get_afinfo() argument
103 if (unlikely(family >= NPROTO)) in xfrm_policy_get_afinfo()
106 afinfo = rcu_dereference(xfrm_policy_afinfo[family]); in xfrm_policy_get_afinfo()
120 int family, u32 mark) in __xfrm_dst_lookup() argument
125 afinfo = xfrm_policy_get_afinfo(family); in __xfrm_dst_lookup()
139 int family, u32 mark) in xfrm_dst_lookup() argument
155 dst = __xfrm_dst_lookup(net, tos, saddr, daddr, family, mark); in xfrm_dst_lookup()
354 unsigned short family, int dir, in __get_hash_thresh() argument
357 switch (family) { in __get_hash_thresh()
376 unsigned short family, int dir) in policy_hash_bysel() argument
383 __get_hash_thresh(net, family, dir, &dbits, &sbits); in policy_hash_bysel()
384 hash = __sel_hash(sel, family, hmask, dbits, sbits); in policy_hash_bysel()
394 unsigned short family, int dir) in policy_hash_direct() argument
401 __get_hash_thresh(net, family, dir, &dbits, &sbits); in policy_hash_direct()
402 hash = __addr_hash(daddr, saddr, family, hmask, dbits, sbits); in policy_hash_direct()
423 __get_hash_thresh(net, pol->family, dir, &dbits, &sbits); in xfrm_dst_hash_transfer()
425 pol->family, nhashmask, dbits, sbits); in xfrm_dst_hash_transfer()
629 policy->family, in xfrm_hash_rebuild()
755 chain = policy_hash_bysel(net, &policy->selector, policy->family, dir); in xfrm_policy_insert()
787 if (policy->family == AF_INET) in xfrm_policy_insert()
824 chain = policy_hash_bysel(net, sel, sel->family, dir); in xfrm_policy_bysel_ctx()
1070 u8 type, u16 family, int dir) in xfrm_policy_match() argument
1076 if (pol->family != family || in xfrm_policy_match()
1081 match = xfrm_selector_match(sel, fl, family); in xfrm_policy_match()
1091 u16 family, u8 dir) in xfrm_policy_lookup_bytype() argument
1099 daddr = xfrm_flowi_daddr(fl, family); in xfrm_policy_lookup_bytype()
1100 saddr = xfrm_flowi_saddr(fl, family); in xfrm_policy_lookup_bytype()
1105 chain = policy_hash_direct(net, daddr, saddr, family, dir); in xfrm_policy_lookup_bytype()
1108 err = xfrm_policy_match(pol, fl, type, family, dir); in xfrm_policy_lookup_bytype()
1124 err = xfrm_policy_match(pol, fl, type, family, dir); in xfrm_policy_lookup_bytype()
1146 __xfrm_policy_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir) in __xfrm_policy_lookup() argument
1151 pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family, dir); in __xfrm_policy_lookup()
1155 return xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_MAIN, fl, family, dir); in __xfrm_policy_lookup()
1177 xfrm_policy_lookup(struct net *net, const struct flowi *fl, u16 family, in xfrm_policy_lookup() argument
1185 pol = __xfrm_policy_lookup(net, fl, family, flow_to_policy_dir(dir)); in xfrm_policy_lookup()
1214 const struct flowi *fl, u16 family) in xfrm_sk_policy_lookup() argument
1221 bool match = xfrm_selector_match(&pol->selector, fl, family); in xfrm_sk_policy_lookup()
1250 pol->family, dir); in __xfrm_policy_link()
1348 newp->family = old->family; in clone_policy()
1374 unsigned short family, u32 mark) in xfrm_get_saddr() argument
1377 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); in xfrm_get_saddr()
1390 struct xfrm_state **xfrm, unsigned short family) in xfrm_tmpl_resolve_one() argument
1395 xfrm_address_t *daddr = xfrm_flowi_daddr(fl, family); in xfrm_tmpl_resolve_one()
1396 xfrm_address_t *saddr = xfrm_flowi_saddr(fl, family); in xfrm_tmpl_resolve_one()
1418 x = xfrm_state_find(remote, local, fl, tmpl, policy, &error, family); in xfrm_tmpl_resolve_one()
1447 struct xfrm_state **xfrm, unsigned short family) in xfrm_tmpl_resolve() argument
1462 ret = xfrm_tmpl_resolve_one(pols[i], fl, &tpp[cnx], family); in xfrm_tmpl_resolve()
1472 xfrm_state_sort(xfrm, tpp, cnx, family); in xfrm_tmpl_resolve()
1487 static inline int xfrm_get_tos(const struct flowi *fl, int family) in xfrm_get_tos() argument
1489 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); in xfrm_get_tos()
1552 static inline struct xfrm_dst *xfrm_alloc_dst(struct net *net, int family) in xfrm_alloc_dst() argument
1554 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); in xfrm_alloc_dst()
1561 switch (family) { in xfrm_alloc_dst()
1594 xfrm_policy_get_afinfo(dst->ops->family); in xfrm_init_path()
1611 xfrm_policy_get_afinfo(xdst->u.dst.ops->family); in xfrm_fill_dst()
1646 int family = policy->selector.family; in xfrm_bundle_create() local
1649 xfrm_flowi_addr_get(fl, &saddr, &daddr, family); in xfrm_bundle_create()
1651 tos = xfrm_get_tos(fl, family); in xfrm_bundle_create()
1659 struct xfrm_dst *xdst = xfrm_alloc_dst(net, family); in xfrm_bundle_create()
1668 if (xfrm[i]->sel.family == AF_UNSPEC) { in xfrm_bundle_create()
1670 xfrm_af2proto(family)); in xfrm_bundle_create()
1690 family = xfrm[i]->props.family; in xfrm_bundle_create()
1692 family, in xfrm_bundle_create()
1756 static int xfrm_expand_policies(const struct flowi *fl, u16 family, in xfrm_expand_policies() argument
1777 fl, family, in xfrm_expand_policies()
1802 const struct flowi *fl, u16 family, in xfrm_resolve_and_create_bundle() argument
1812 err = xfrm_tmpl_resolve(pols, num_pols, fl, xfrm, family); in xfrm_resolve_and_create_bundle()
1853 xfrm_decode_session(skb, &fl, dst->ops->family); in xfrm_policy_queue_process()
1886 xfrm_decode_session(skb, &fl, skb_dst(skb)->ops->family); in xfrm_policy_queue_process()
1958 u16 family) in xfrm_create_dummy_bundle() argument
1966 xdst = xfrm_alloc_dst(net, family); in xfrm_create_dummy_bundle()
2014 xfrm_bundle_lookup(struct net *net, const struct flowi *fl, u16 family, u8 dir, in xfrm_bundle_lookup() argument
2046 pols[0] = __xfrm_policy_lookup(net, fl, family, in xfrm_bundle_lookup()
2048 err = xfrm_expand_policies(fl, family, pols, in xfrm_bundle_lookup()
2058 new_xdst = xfrm_resolve_and_create_bundle(pols, num_pols, fl, family, in xfrm_bundle_lookup()
2093 xdst = xfrm_create_dummy_bundle(net, xflo, fl, num_xfrms, family); in xfrm_bundle_lookup()
2115 static struct dst_entry *make_blackhole(struct net *net, u16 family, in make_blackhole() argument
2118 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); in make_blackhole()
2145 u16 family = dst_orig->ops->family; in xfrm_lookup() local
2155 pols[0] = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl, family); in xfrm_lookup()
2156 err = xfrm_expand_policies(fl, family, pols, in xfrm_lookup()
2169 family, dst_orig); in xfrm_lookup()
2197 flo = flow_cache_lookup(net, fl, family, dir, in xfrm_lookup()
2294 return make_blackhole(net, dst_orig->ops->family, dst_orig); in xfrm_lookup_route()
2321 unsigned short family) in xfrm_state_ok() argument
2332 xfrm_state_addr_cmp(tmpl, x, family)); in xfrm_state_ok()
2344 unsigned short family) in xfrm_policy_ok() argument
2354 if (xfrm_state_ok(tmpl, sp->xvec[idx], family)) in xfrm_policy_ok()
2366 unsigned int family, int reverse) in __xfrm_decode_session() argument
2368 struct xfrm_policy_afinfo *afinfo = xfrm_policy_get_afinfo(family); in __xfrm_decode_session()
2394 unsigned short family) in __xfrm_policy_check() argument
2411 if (__xfrm_decode_session(skb, &fl, family, reverse) < 0) { in __xfrm_policy_check()
2416 nf_nat_decode_session(skb, &fl, family); in __xfrm_policy_check()
2424 if (!xfrm_selector_match(&x->sel, &fl, family)) { in __xfrm_policy_check()
2433 pol = xfrm_sk_policy_lookup(sk, dir, &fl, family); in __xfrm_policy_check()
2443 flo = flow_cache_lookup(net, &fl, family, fl_dir, in __xfrm_policy_check()
2472 &fl, family, in __xfrm_policy_check()
2512 xfrm_tmpl_sort(stp, tpp, xfrm_nr, family, net); in __xfrm_policy_check()
2523 k = xfrm_policy_ok(tpp[i], sp, k, family); in __xfrm_policy_check()
2551 int __xfrm_route_forward(struct sk_buff *skb, unsigned short family) in __xfrm_route_forward() argument
2558 if (xfrm_decode_session(skb, &fl, family) < 0) { in __xfrm_route_forward()
2762 if (unlikely(afinfo->family >= NPROTO)) in xfrm_policy_register_afinfo()
2765 if (unlikely(xfrm_policy_afinfo[afinfo->family] != NULL)) in xfrm_policy_register_afinfo()
2785 rcu_assign_pointer(xfrm_policy_afinfo[afinfo->family], afinfo); in xfrm_policy_register_afinfo()
2798 if (unlikely(afinfo->family >= NPROTO)) in xfrm_policy_unregister_afinfo()
2801 if (likely(xfrm_policy_afinfo[afinfo->family] != NULL)) { in xfrm_policy_unregister_afinfo()
2802 if (unlikely(xfrm_policy_afinfo[afinfo->family] != afinfo)) in xfrm_policy_unregister_afinfo()
2805 RCU_INIT_POINTER(xfrm_policy_afinfo[afinfo->family], in xfrm_policy_unregister_afinfo()
3028 switch (sel->family) { in xfrm_audit_common_policyinfo()
3087 if (sel_tgt->family == sel_cmp->family && in xfrm_migrate_selector_match()
3089 sel_cmp->family) && in xfrm_migrate_selector_match()
3091 sel_cmp->family) && in xfrm_migrate_selector_match()
3112 chain = policy_hash_direct(net, &sel->daddr, &sel->saddr, sel->family, dir); in xfrm_migrate_policy_find()