• Home
  • Raw
  • Download

Lines Matching refs:fl

58 __xfrm4_selector_match(struct xfrm_selector *sel, struct flowi *fl)  in __xfrm4_selector_match()  argument
60 return addr_match(&fl->fl4_dst, &sel->daddr, sel->prefixlen_d) && in __xfrm4_selector_match()
61 addr_match(&fl->fl4_src, &sel->saddr, sel->prefixlen_s) && in __xfrm4_selector_match()
62 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) && in __xfrm4_selector_match()
63 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && in __xfrm4_selector_match()
64 (fl->proto == sel->proto || !sel->proto) && in __xfrm4_selector_match()
65 (fl->oif == sel->ifindex || !sel->ifindex); in __xfrm4_selector_match()
69 __xfrm6_selector_match(struct xfrm_selector *sel, struct flowi *fl) in __xfrm6_selector_match() argument
71 return addr_match(&fl->fl6_dst, &sel->daddr, sel->prefixlen_d) && in __xfrm6_selector_match()
72 addr_match(&fl->fl6_src, &sel->saddr, sel->prefixlen_s) && in __xfrm6_selector_match()
73 !((xfrm_flowi_dport(fl) ^ sel->dport) & sel->dport_mask) && in __xfrm6_selector_match()
74 !((xfrm_flowi_sport(fl) ^ sel->sport) & sel->sport_mask) && in __xfrm6_selector_match()
75 (fl->proto == sel->proto || !sel->proto) && in __xfrm6_selector_match()
76 (fl->oif == sel->ifindex || !sel->ifindex); in __xfrm6_selector_match()
79 int xfrm_selector_match(struct xfrm_selector *sel, struct flowi *fl, in xfrm_selector_match() argument
84 return __xfrm4_selector_match(sel, fl); in xfrm_selector_match()
86 return __xfrm6_selector_match(sel, fl); in xfrm_selector_match()
905 static int xfrm_policy_match(struct xfrm_policy *pol, struct flowi *fl, in xfrm_policy_match() argument
915 match = xfrm_selector_match(sel, fl, family); in xfrm_policy_match()
917 ret = security_xfrm_policy_lookup(pol->security, fl->secid, in xfrm_policy_match()
924 struct flowi *fl, in xfrm_policy_lookup_bytype() argument
934 daddr = xfrm_flowi_daddr(fl, family); in xfrm_policy_lookup_bytype()
935 saddr = xfrm_flowi_saddr(fl, family); in xfrm_policy_lookup_bytype()
943 err = xfrm_policy_match(pol, fl, type, family, dir); in xfrm_policy_lookup_bytype()
959 err = xfrm_policy_match(pol, fl, type, family, dir); in xfrm_policy_lookup_bytype()
980 static int xfrm_policy_lookup(struct net *net, struct flowi *fl, u16 family, in xfrm_policy_lookup() argument
987 pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_SUB, fl, family, dir); in xfrm_policy_lookup()
995 pol = xfrm_policy_lookup_bytype(net, XFRM_POLICY_TYPE_MAIN, fl, family, dir); in xfrm_policy_lookup()
1025 static struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl) in xfrm_sk_policy_lookup() argument
1031 int match = xfrm_selector_match(&pol->selector, fl, in xfrm_sk_policy_lookup()
1037 fl->secid, in xfrm_sk_policy_lookup()
1185 xfrm_tmpl_resolve_one(struct xfrm_policy *policy, struct flowi *fl, in xfrm_tmpl_resolve_one() argument
1192 xfrm_address_t *daddr = xfrm_flowi_daddr(fl, family); in xfrm_tmpl_resolve_one()
1193 xfrm_address_t *saddr = xfrm_flowi_saddr(fl, family); in xfrm_tmpl_resolve_one()
1215 x = xfrm_state_find(remote, local, fl, tmpl, policy, &error, family); in xfrm_tmpl_resolve_one()
1243 xfrm_tmpl_resolve(struct xfrm_policy **pols, int npols, struct flowi *fl, in xfrm_tmpl_resolve() argument
1260 ret = xfrm_tmpl_resolve_one(pols[i], fl, &tpp[cnx], family); in xfrm_tmpl_resolve()
1286 xfrm_find_bundle(struct flowi *fl, struct xfrm_policy *policy, unsigned short family) in xfrm_find_bundle() argument
1292 x = afinfo->find_bundle(fl, policy); in xfrm_find_bundle()
1297 static inline int xfrm_get_tos(struct flowi *fl, int family) in xfrm_get_tos() argument
1305 tos = afinfo->get_tos(fl); in xfrm_get_tos()
1366 struct flowi *fl, in xfrm_bundle_create() argument
1382 xfrm_flowi_addr_get(fl, &saddr, &daddr, family); in xfrm_bundle_create()
1384 tos = xfrm_get_tos(fl, family); in xfrm_bundle_create()
1505 xfrm_dst_update_origin(struct dst_entry *dst, struct flowi *fl) in xfrm_dst_update_origin() argument
1509 return xfrm_dst_alloc_copy((void **)&(xdst->origin), fl, sizeof(*fl)); in xfrm_dst_update_origin()
1522 int __xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl, in __xfrm_lookup() argument
1549 policy = xfrm_sk_policy_lookup(sk, XFRM_POLICY_OUT, fl); in __xfrm_lookup()
1563 policy = flow_cache_lookup(net, fl, dst_orig->ops->family, in __xfrm_lookup()
1608 dst = xfrm_find_bundle(fl, policy, family); in __xfrm_lookup()
1622 fl, family, in __xfrm_lookup()
1654 nx = xfrm_tmpl_resolve(pols, npols, fl, xfrm, family); in __xfrm_lookup()
1675 nx = xfrm_tmpl_resolve(pols, npols, fl, xfrm, family); in __xfrm_lookup()
1700 dst = xfrm_bundle_create(policy, xfrm, nx, fl, dst_orig); in __xfrm_lookup()
1734 err = xfrm_dst_update_origin(dst, fl); in __xfrm_lookup()
1767 int xfrm_lookup(struct net *net, struct dst_entry **dst_p, struct flowi *fl, in xfrm_lookup() argument
1770 int err = __xfrm_lookup(net, dst_p, fl, sk, flags); in xfrm_lookup()
1783 xfrm_secpath_reject(int idx, struct sk_buff *skb, struct flowi *fl) in xfrm_secpath_reject() argument
1792 return x->type->reject(x, skb, fl); in xfrm_secpath_reject()
1847 int __xfrm_decode_session(struct sk_buff *skb, struct flowi *fl, in __xfrm_decode_session() argument
1856 afinfo->decode_session(skb, fl, reverse); in __xfrm_decode_session()
1857 err = security_xfrm_decode_session(skb, &fl->secid); in __xfrm_decode_session()
1885 struct flowi fl; in __xfrm_policy_check() local
1893 if (__xfrm_decode_session(skb, &fl, family, reverse) < 0) { in __xfrm_policy_check()
1898 nf_nat_decode_session(skb, &fl, family); in __xfrm_policy_check()
1906 if (!xfrm_selector_match(&x->sel, &fl, family)) { in __xfrm_policy_check()
1915 pol = xfrm_sk_policy_lookup(sk, dir, &fl); in __xfrm_policy_check()
1923 pol = flow_cache_lookup(net, &fl, family, fl_dir, in __xfrm_policy_check()
1933 xfrm_secpath_reject(xerr_idx, skb, &fl); in __xfrm_policy_check()
1947 &fl, family, in __xfrm_policy_check()
2019 xfrm_secpath_reject(xerr_idx, skb, &fl); in __xfrm_policy_check()
2029 struct flowi fl; in __xfrm_route_forward() local
2031 if (xfrm_decode_session(skb, &fl, family) < 0) { in __xfrm_route_forward()
2037 return xfrm_lookup(net, &skb->dst, &fl, NULL, 0) == 0; in __xfrm_route_forward()
2194 struct flowi *fl, int family, int strict) in xfrm_bundle_ok() argument
2204 if (fl) { in xfrm_bundle_ok()
2205 if (first->origin && !flow_cache_uli_match(first->origin, fl)) in xfrm_bundle_ok()
2208 !xfrm_selector_match(first->partner, fl, family)) in xfrm_bundle_ok()
2218 if (fl && !xfrm_selector_match(&dst->xfrm->sel, fl, family)) in xfrm_bundle_ok()
2220 if (fl && pol && in xfrm_bundle_ok()
2221 !security_xfrm_state_pol_flow_match(dst->xfrm, pol, fl)) in xfrm_bundle_ok()
2228 if (strict && fl && in xfrm_bundle_ok()
2230 !xfrm_state_addr_flow_check(dst->xfrm, fl, family)) in xfrm_bundle_ok()