Lines Matching refs:rt

127 	struct rtentry *rt;
154 if (ifscope != IFSCOPE_NONE && (rt = ip6forward_rt->ro_rt) != NULL) {
155 RT_LOCK(rt);
156 if (rt->rt_ifp->if_index != ifscope) {
157 RT_UNLOCK(rt);
158 rtfree(rt);
159 rt = ip6forward_rt->ro_rt = NULL;
161 RT_UNLOCK(rt);
193 /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */
209 /* XXX in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard) */
378 if ((rt = ip6forward_rt->ro_rt) != NULL) {
379 RT_LOCK(rt);
381 RT_ADDREF_LOCKED(rt);
388 if (rt == NULL || !(rt->rt_flags & RTF_UP) ||
389 rt->generation_id != route_generation) {
390 if (rt != NULL) {
392 RT_REMREF_LOCKED(rt);
393 RT_UNLOCK(rt);
394 rtfree(rt);
400 if ((rt = ip6forward_rt->ro_rt) != NULL) {
401 RT_LOCK(rt);
403 RT_ADDREF_LOCKED(rt);
407 if (rt == NULL) {
416 RT_LOCK_ASSERT_HELD(rt);
417 } else if (rt == NULL || !(rt->rt_flags & RTF_UP) ||
419 rt->generation_id != route_generation) {
420 if (rt != NULL) {
422 RT_REMREF_LOCKED(rt);
423 RT_UNLOCK(rt);
424 rtfree(rt);
434 if ((rt = ip6forward_rt->ro_rt) == NULL) {
443 RT_LOCK(rt);
445 RT_ADDREF_LOCKED(rt);
459 if (in6_setscope(&src_in6, rt->rt_ifp, &outzone)) {
476 in6_ifstat_inc(rt->rt_ifp, ifs6_in_discard);
486 if_name(m->m_pkthdr.rcvif), if_name(rt->rt_ifp));
489 RT_REMREF_LOCKED(rt);
490 RT_UNLOCK(rt);
508 in6_setscope(&dst_in6, rt->rt_ifp, &outzone) != 0 ||
516 if (m->m_pkthdr.len > rt->rt_ifp->if_mtu) {
517 in6_ifstat_inc(rt->rt_ifp, ifs6_in_toobig);
526 mtu = rt->rt_ifp->if_mtu;
533 * encapsulated packet as "rt->rt_ifp".
552 RT_REMREF_LOCKED(rt);
553 RT_UNLOCK(rt);
557 RT_REMREF_LOCKED(rt);
558 RT_UNLOCK(rt);
564 if (rt->rt_flags & RTF_GATEWAY)
565 dst = (struct sockaddr_in6 *)(void *)rt->rt_gateway;
577 ip6_sendredirects && rt->rt_ifp == m->m_pkthdr.rcvif && !srcrt &&
578 (rt->rt_flags & (RTF_DYNAMIC|RTF_MODIFIED)) == 0) {
579 if ((rt->rt_ifp->if_flags & IFF_POINTOPOINT) != 0) {
590 RT_REMREF_LOCKED(rt); /* Release extra ref */
591 RT_UNLOCK(rt);
606 ifp = rt->rt_ifp;
608 RT_UNLOCK(rt);
617 /* We still have the extra ref on rt */
618 RT_LOCK(rt);
630 if ((rt->rt_ifp->if_flags & IFF_LOOPBACK) != 0) {
643 if ((rt->rt_flags & (RTF_BLACKHOLE|RTF_REJECT)) == 0)
651 if_name(rt->rt_ifp));
658 origifp = rt->rt_ifp;
666 ifp = rt->rt_ifp;
668 RT_UNLOCK(rt);
676 RT_REMREF(rt);
697 error = nd6_output(ifp, origifp, m, dst, rt, NULL);
717 RT_REMREF(rt);
724 icmp6_redirect_output(mcopy, rt);
726 RT_REMREF(rt);
751 RT_REMREF(rt);
757 RT_REMREF(rt);