Ejemplo n.º 1
0
/* ARGSUSED */
static void
lortrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
{

	RT_LOCK_ASSERT(rt);
	rt->rt_rmx.rmx_mtu = rt->rt_ifp->if_mtu;
}
Ejemplo n.º 2
0
/*
 * On last reference drop, mark the route as belong to us so that it can be
 * timed out.
 */
static void
in_clsroute(struct radix_node *rn, struct radix_node_head *head)
{
	struct rtentry *rt = (struct rtentry *)rn;

	RT_LOCK_ASSERT(rt);

	if (!(rt->rt_flags & RTF_UP))
		return;			/* prophylactic measures */

	if (rt->rt_flags & RTPRF_OURS)
		return;

	if (!(rt->rt_flags & RTF_DYNAMIC))
		return;

	/*
	 * If rtq_reallyold is 0, just delete the route without
	 * waiting for a timeout cycle to kill it.
	 */
	if (V_rtq_reallyold != 0) {
		rt->rt_flags |= RTPRF_OURS;
		rt->rt_rmx.rmx_expire = time_uptime + V_rtq_reallyold;
	} else {
		rtexpunge(rt);
	}
}
Ejemplo n.º 3
0
/*
 * On last reference drop, mark the route as belong to us so that it can be
 * timed out.
 */
static void
in6_clsroute(struct radix_node *rn, struct radix_node_head *head)
{
	struct rtentry *rt = (struct rtentry *)rn;

	RT_LOCK_ASSERT(rt);

	if (!(rt->rt_flags & RTF_UP))
		return;		/* prophylactic measures */

	if ((rt->rt_flags & (RTF_LLINFO | RTF_HOST)) != RTF_HOST)
		return;

	if ((rt->rt_flags & (RTF_WASCLONED | RTPRF_OURS)) != RTF_WASCLONED)
		return;

	/*
	 * As requested by David Greenman:
	 * If rtq_reallyold is 0, just delete the route without
	 * waiting for a timeout cycle to kill it.
	 */
	if (rtq_reallyold != 0) {
		rt->rt_flags |= RTPRF_OURS;
		rt->rt_rmx.rmx_expire = time_second + rtq_reallyold;
	} else {
		rtexpunge(rt);
	}
}
Ejemplo n.º 4
0
/*
 * Remove incoming-label map (ilm).
 */
static void	
mpls_rn_clsroute(struct radix_node *rn, struct radix_node_head *rnh)
{
	struct rtentry *rt = (struct rtentry *)rn;
	
	KASSERT((rnh != NULL), ("radix_node_head{} not defined"));
	KASSERT((rt != NULL), ("ilm not defined"));
	
	RT_LOCK_ASSERT(rt);

	if ((rt->rt_flags & RTF_UP) 
		&& (rt->rt_refcnt < 1)) 
			rtexpunge(rt);
}
Ejemplo n.º 5
0
/* ARGSUSED */
static void
discrtrequest(int cmd, struct rtentry *rt, struct rt_addrinfo *info)
{
	RT_LOCK_ASSERT(rt);
	rt->rt_rmx.rmx_mtu = DSMTU;
}