• Home
  • Raw
  • Download

Lines Matching refs:xdst

162 static int xfrm_bundle_ok(struct xfrm_dst *xdst);
2469 struct xfrm_dst *xdst; in xfrm_alloc_dst() local
2486 xdst = dst_alloc(dst_ops, NULL, 1, DST_OBSOLETE_NONE, 0); in xfrm_alloc_dst()
2488 if (likely(xdst)) { in xfrm_alloc_dst()
2489 struct dst_entry *dst = &xdst->u.dst; in xfrm_alloc_dst()
2491 memset(dst + 1, 0, sizeof(*xdst) - sizeof(*dst)); in xfrm_alloc_dst()
2493 xdst = ERR_PTR(-ENOBUFS); in xfrm_alloc_dst()
2497 return xdst; in xfrm_alloc_dst()
2510 static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, in xfrm_fill_dst() argument
2514 xfrm_policy_get_afinfo(xdst->u.dst.ops->family); in xfrm_fill_dst()
2520 err = afinfo->fill_dst(xdst, dev, fl); in xfrm_fill_dst()
2562 struct xfrm_dst *xdst = xfrm_alloc_dst(net, family); in xfrm_bundle_create() local
2563 struct dst_entry *dst1 = &xdst->u.dst; in xfrm_bundle_create()
2565 err = PTR_ERR(xdst); in xfrm_bundle_create()
2566 if (IS_ERR(xdst)) { in xfrm_bundle_create()
2571 bundle[i] = xdst; in xfrm_bundle_create()
2573 xdst0 = xdst; in xfrm_bundle_create()
2578 xfrm_dst_set_child(xdst_prev, &xdst->u.dst); in xfrm_bundle_create()
2591 xdst->route = dst; in xfrm_bundle_create()
2610 xdst->xfrm_genid = xfrm[i]->genid; in xfrm_bundle_create()
2626 xdst_prev = xdst; in xfrm_bundle_create()
2722 struct xfrm_dst *xdst; in xfrm_resolve_and_create_bundle() local
2743 xdst = (struct xfrm_dst *)dst; in xfrm_resolve_and_create_bundle()
2744 xdst->num_xfrms = err; in xfrm_resolve_and_create_bundle()
2745 xdst->num_pols = num_pols; in xfrm_resolve_and_create_bundle()
2746 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_resolve_and_create_bundle()
2747 xdst->policy_genid = atomic_read(&pols[0]->genid); in xfrm_resolve_and_create_bundle()
2749 return xdst; in xfrm_resolve_and_create_bundle()
2832 struct xfrm_dst *xdst = (struct xfrm_dst *) dst; in xdst_queue_output() local
2833 struct xfrm_policy *pol = xdst->pols[0]; in xdst_queue_output()
2880 struct xfrm_dst *xdst; in xfrm_create_dummy_bundle() local
2882 xdst = xfrm_alloc_dst(net, family); in xfrm_create_dummy_bundle()
2883 if (IS_ERR(xdst)) in xfrm_create_dummy_bundle()
2884 return xdst; in xfrm_create_dummy_bundle()
2889 return xdst; in xfrm_create_dummy_bundle()
2892 dst1 = &xdst->u.dst; in xfrm_create_dummy_bundle()
2894 xdst->route = dst; in xfrm_create_dummy_bundle()
2906 xfrm_dst_set_child(xdst, dst); in xfrm_create_dummy_bundle()
2907 xdst->path = dst; in xfrm_create_dummy_bundle()
2916 err = xfrm_fill_dst(xdst, dev, fl); in xfrm_create_dummy_bundle()
2921 return xdst; in xfrm_create_dummy_bundle()
2925 xdst = ERR_PTR(err); in xfrm_create_dummy_bundle()
2936 struct xfrm_dst *xdst; in xfrm_bundle_lookup() local
2951 xdst = xfrm_resolve_and_create_bundle(pols, num_pols, fl, family, in xfrm_bundle_lookup()
2953 if (IS_ERR(xdst)) { in xfrm_bundle_lookup()
2954 err = PTR_ERR(xdst); in xfrm_bundle_lookup()
2963 } else if (xdst == NULL) { in xfrm_bundle_lookup()
2968 return xdst; in xfrm_bundle_lookup()
2974 xdst = xfrm_create_dummy_bundle(net, xflo, fl, num_xfrms, family); in xfrm_bundle_lookup()
2975 if (IS_ERR(xdst)) { in xfrm_bundle_lookup()
2977 return ERR_CAST(xdst); in xfrm_bundle_lookup()
2979 xdst->num_pols = num_pols; in xfrm_bundle_lookup()
2980 xdst->num_xfrms = num_xfrms; in xfrm_bundle_lookup()
2981 memcpy(xdst->pols, pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_bundle_lookup()
2983 return xdst; in xfrm_bundle_lookup()
3024 struct xfrm_dst *xdst; in xfrm_lookup_with_ifid() local
3031 xdst = NULL; in xfrm_lookup_with_ifid()
3050 xdst = xfrm_resolve_and_create_bundle( in xfrm_lookup_with_ifid()
3054 if (IS_ERR(xdst)) { in xfrm_lookup_with_ifid()
3056 err = PTR_ERR(xdst); in xfrm_lookup_with_ifid()
3061 } else if (xdst == NULL) { in xfrm_lookup_with_ifid()
3067 route = xdst->route; in xfrm_lookup_with_ifid()
3071 if (xdst == NULL) { in xfrm_lookup_with_ifid()
3082 xdst = xfrm_bundle_lookup(net, fl, family, dir, &xflo, if_id); in xfrm_lookup_with_ifid()
3083 if (xdst == NULL) in xfrm_lookup_with_ifid()
3085 if (IS_ERR(xdst)) { in xfrm_lookup_with_ifid()
3086 err = PTR_ERR(xdst); in xfrm_lookup_with_ifid()
3090 num_pols = xdst->num_pols; in xfrm_lookup_with_ifid()
3091 num_xfrms = xdst->num_xfrms; in xfrm_lookup_with_ifid()
3092 memcpy(pols, xdst->pols, sizeof(struct xfrm_policy *) * num_pols); in xfrm_lookup_with_ifid()
3093 route = xdst->route; in xfrm_lookup_with_ifid()
3096 dst = &xdst->u.dst; in xfrm_lookup_with_ifid()
3764 struct xfrm_dst *xdst = bundle[nr]; in xfrm_init_pmtu() local
3768 dst = &xdst->u.dst; in xfrm_init_pmtu()
3770 xdst->child_mtu_cached = pmtu; in xfrm_init_pmtu()
3774 route_mtu_cached = dst_mtu(xdst->route); in xfrm_init_pmtu()
3775 xdst->route_mtu_cached = route_mtu_cached; in xfrm_init_pmtu()
3792 struct xfrm_dst *xdst; in xfrm_bundle_ok() local
3805 struct xfrm_dst *xdst = (struct xfrm_dst *)dst; in xfrm_bundle_ok() local
3809 if (xdst->xfrm_genid != dst->xfrm->genid) in xfrm_bundle_ok()
3811 if (xdst->num_pols > 0 && in xfrm_bundle_ok()
3812 xdst->policy_genid != atomic_read(&xdst->pols[0]->genid)) in xfrm_bundle_ok()
3815 bundle[nr++] = xdst; in xfrm_bundle_ok()
3818 if (xdst->child_mtu_cached != mtu) { in xfrm_bundle_ok()
3820 xdst->child_mtu_cached = mtu; in xfrm_bundle_ok()
3823 if (!dst_check(xdst->route, xdst->route_cookie)) in xfrm_bundle_ok()
3825 mtu = dst_mtu(xdst->route); in xfrm_bundle_ok()
3826 if (xdst->route_mtu_cached != mtu) { in xfrm_bundle_ok()
3828 xdst->route_mtu_cached = mtu; in xfrm_bundle_ok()
3837 xdst = bundle[start_from - 1]; in xfrm_bundle_ok()
3838 mtu = xdst->child_mtu_cached; in xfrm_bundle_ok()
3840 dst = &xdst->u.dst; in xfrm_bundle_ok()
3843 if (mtu > xdst->route_mtu_cached) in xfrm_bundle_ok()
3844 mtu = xdst->route_mtu_cached; in xfrm_bundle_ok()
3849 xdst = bundle[start_from - 1]; in xfrm_bundle_ok()
3850 xdst->child_mtu_cached = mtu; in xfrm_bundle_ok()