x->u.rt.idev = rt0->idev; in_dev_hold(rt0->idev); 
__xfrm4_bundle_create(struct xfrm_policy *policy, struct xfrm_state **xfrm, int nx,		      struct flowi *fl, struct dst_entry **dst_p){	struct dst_entry *dst, *dst_prev;	struct rtable *rt0 = (struct rtable*)(*dst_p);	struct rtable *rt = rt0;	u32 remote = fl->fl4_dst;	u32 local  = fl->fl4_src;	struct flowi fl_tunnel = {		.nl_u = {			.ip4_u = {				.saddr = local,				.daddr = remote			}		}	};	int i;	int err;	int header_len = 0;	int trailer_len = 0;	dst = dst_prev = NULL;	dst_hold(&rt->u.dst);	for (i = 0; i < nx; i++) {		struct dst_entry *dst1 = dst_alloc(&xfrm4_dst_ops);		struct xfrm_dst *xdst;		int tunnel = 0;		if (unlikely(dst1 == NULL)) {			err = -ENOBUFS;			dst_release(&rt->u.dst);			goto error;		}		if (!dst)			dst = dst1;		else {			dst_prev->child = dst1;			dst1->flags |= DST_NOHASH;			dst_clone(dst1);		}		xdst = (struct xfrm_dst *)dst1;		xdst->route = &rt->u.dst;		dst1->next = dst_prev;		dst_prev = dst1;		if (xfrm[i]->props.mode) {			remote = xfrm[i]->id.daddr.a4;			local  = xfrm[i]->props.saddr.a4;			tunnel = 1;		}		header_len += xfrm[i]->props.header_len;		trailer_len += xfrm[i]->props.trailer_len;		if (tunnel) {			fl_tunnel.fl4_src = local;			fl_tunnel.fl4_dst = remote;			err = xfrm_dst_lookup((struct xfrm_dst **)&rt,					      &fl_tunnel, AF_INET);			if (err)				goto error;		} else			dst_hold(&rt->u.dst);	}	dst_prev->child = &rt->u.dst;	dst->path = &rt->u.dst;	*dst_p = dst;	dst = dst_prev;	dst_prev = *dst_p;	i = 0;	for (; dst_prev != &rt->u.dst; dst_prev = dst_prev->child) {		struct xfrm_dst *x = (struct xfrm_dst*)dst_prev;		x->u.rt.fl = *fl;		dst_prev->xfrm = xfrm[i++];		dst_prev->dev = rt->u.dst.dev;		if (rt->u.dst.dev)			dev_hold(rt->u.dst.dev);		dst_prev->obsolete	= -1;		dst_prev->flags	       |= DST_HOST;		dst_prev->lastuse	= jiffies;		dst_prev->header_len	= header_len;		dst_prev->trailer_len	= trailer_len;		memcpy(&dst_prev->metrics, &x->route->metrics, sizeof(dst_prev->metrics));		/* Copy neighbout for reachability confirmation */		dst_prev->neighbour	= neigh_clone(rt->u.dst.neighbour);		dst_prev->input		= rt->u.dst.input;		dst_prev->output	= xfrm4_output;		if (rt->peer)			atomic_inc(&rt->peer->refcnt);		x->u.rt.peer = rt->peer;		/* Sheit... I remember I did this right. Apparently,		 * it was magically lost, so this code needs audit */		x->u.rt.rt_flags = rt0->rt_flags&(RTCF_BROADCAST|RTCF_MULTICAST|RTCF_LOCAL);		x->u.rt.rt_type = rt->rt_type;		x->u.rt.rt_src = rt0->rt_src;		x->u.rt.rt_dst = rt0->rt_dst;		x->u.rt.rt_gateway = rt->rt_gateway;		x->u.rt.rt_spec_dst = rt0->rt_spec_dst;		header_len -= x->u.dst.xfrm->props.header_len;		trailer_len -= x->u.dst.xfrm->props.trailer_len;	}	xfrm_init_pmtu(dst);	return 0;error:	if (dst)		dst_free(dst);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/aabc9761b69f1bfa30a78f7005be95cc9cc06175/xfrm4_policy.c/clean/net/ipv4/xfrm4_policy.c