Lines Matching refs:ro_rt

431 		if (ro->ro_rt != NULL) {
432 RT_LOCK_SPIN(ro->ro_rt);
433 ia = (struct in_ifaddr *)ro->ro_rt->rt_ifa;
436 RT_CONVERT_LOCK(ro->ro_rt);
439 RT_UNLOCK(ro->ro_rt);
546 if (ro->ro_rt != NULL) {
547 if (ro->ro_rt->generation_id != route_generation &&
563 if ((ro->ro_rt->rt_flags & RTF_UP) == 0 ||
566 rtfree(ro->ro_rt);
567 ro->ro_rt = NULL;
574 if (!select_srcif && ro->ro_rt != NULL &&
575 ro->ro_rt->generation_id != route_generation)
576 ro->ro_rt->generation_id = route_generation;
578 if (ro->ro_rt == NULL) {
624 (ro->ro_rt == NULL || !(ro->ro_rt->rt_flags & RTF_UP) ||
625 ro->ro_rt->generation_id != route_generation ||
690 if (ro->ro_rt == NULL) {
732 if (nocell && ro->ro_rt != NULL) {
733 RT_LOCK_SPIN(ro->ro_rt);
734 if (ro->ro_rt->rt_ifp->if_type ==
736 RT_UNLOCK(ro->ro_rt);
737 rtfree(ro->ro_rt);
738 ro->ro_rt = NULL;
740 RT_UNLOCK(ro->ro_rt);
745 if (ro->ro_rt == NULL) {
753 RT_LOCK_SPIN(ro->ro_rt);
754 ia = ifatoia(ro->ro_rt->rt_ifa);
757 RT_CONVERT_LOCK(ro->ro_rt);
760 ifp = ro->ro_rt->rt_ifp;
761 ro->ro_rt->rt_use++;
762 if (ro->ro_rt->rt_flags & RTF_GATEWAY) {
764 ro->ro_rt->rt_gateway;
766 if (ro->ro_rt->rt_flags & RTF_HOST) {
767 isbroadcast = (ro->ro_rt->rt_flags & RTF_BROADCAST);
770 RT_CONVERT_LOCK(ro->ro_rt);
773 RT_UNLOCK(ro->ro_rt);
1239 if (ro->ro_rt != NULL && ro->ro_rt->generation_id != route_generation) {
1247 rtfree(ro->ro_rt);
1248 ro->ro_rt = NULL;
1253 if (ro->ro_rt == NULL) {
1265 RT_LOCK_SPIN(ro->ro_rt);
1266 ia = ifatoia(ro->ro_rt->rt_ifa);
1269 RT_CONVERT_LOCK(ro->ro_rt);
1272 ifp = ro->ro_rt->rt_ifp;
1273 RT_UNLOCK(ro->ro_rt);
1549 ro_fwd->ro_rt = NULL;
1552 if (ro_fwd->ro_rt == NULL) {
1558 RT_LOCK_SPIN(ro_fwd->ro_rt);
1559 ia_fw = ifatoia(ro_fwd->ro_rt->rt_ifa);
1562 RT_CONVERT_LOCK(ro_fwd->ro_rt);
1565 ifp = ro_fwd->ro_rt->rt_ifp;
1566 ro_fwd->ro_rt->rt_use++;
1567 if (ro_fwd->ro_rt->rt_flags & RTF_GATEWAY)
1568 dst = (struct sockaddr_in *)(void *)ro_fwd->ro_rt->rt_gateway;
1569 if (ro_fwd->ro_rt->rt_flags & RTF_HOST) {
1571 (ro_fwd->ro_rt->rt_flags & RTF_BROADCAST);
1574 RT_CONVERT_LOCK(ro_fwd->ro_rt);
1577 RT_UNLOCK(ro_fwd->ro_rt);
1578 rtfree(ro->ro_rt);
1579 ro->ro_rt = ro_fwd->ro_rt;
1704 if (ro->ro_rt && nstat_collect)
1705 nstat_route_tx(ro->ro_rt, 1, m->m_pkthdr.len, 0);
1706 error = dlil_output(ifp, PF_INET, m, ro->ro_rt,
1720 if (ro->ro_rt && nstat_collect)
1721 nstat_route_tx(ro->ro_rt, pktcnt, bytecnt, 0);
1724 ro->ro_rt, (struct sockaddr *)dst, 0, adv);
1750 if (ro->ro_rt) {
1751 RT_LOCK_SPIN(ro->ro_rt);
1752 if ((ro->ro_rt->rt_flags & (RTF_UP | RTF_HOST))
1753 && !(ro->ro_rt->rt_rmx.rmx_locks & RTV_MTU)
1754 && (ro->ro_rt->rt_rmx.rmx_mtu > ifp->if_mtu)) {
1755 ro->ro_rt->rt_rmx.rmx_mtu = ifp->if_mtu;
1757 RT_UNLOCK(ro->ro_rt);
1793 if (ro->ro_rt && nstat_collect)
1794 nstat_route_tx(ro->ro_rt, 1, m->m_pkthdr.len, 0);
1795 error = dlil_output(ifp, PF_INET, m, ro->ro_rt,
1811 if (ipsec_state.ro.ro_rt)
1812 rtfree(ipsec_state.ro.ro_rt);
3114 if (ro->ro_rt != NULL)
3115 RT_LOCK(ro->ro_rt);
3117 rt_ifp = (ro->ro_rt != NULL) ? ro->ro_rt->rt_ifp : NULL;
3126 if (ifscope != IFSCOPE_NONE || ro->ro_rt != NULL) {
3141 ro->ro_rt->generation_id != route_generation)
3164 if (ro->ro_rt != NULL) {
3196 if (ifa != NULL && ro->ro_rt == NULL) {
3273 } else if (ifa != NULL && ro->ro_rt != NULL &&
3274 !(ro->ro_rt->rt_flags & RTF_GATEWAY) &&
3275 ifa->ifa_ifp != ro->ro_rt->rt_ifp && ipforwarding) {
3283 ifa = ro->ro_rt->rt_ifa;
3293 if (ro->ro_rt != NULL)
3294 RT_LOCK_ASSERT_HELD(ro->ro_rt);
3301 if (ro->ro_rt != NULL &&
3303 !(ro->ro_rt->rt_flags & RTF_UP))) {
3317 RT_UNLOCK(ro->ro_rt);
3318 rtfree(ro->ro_rt);
3319 ro->ro_rt = NULL;
3352 if (ro->ro_rt != NULL && (!IN_LINKLOCAL(ntohl(dst.s_addr)) ||
3353 (ro->ro_rt->rt_gateway->sa_family == AF_LINK &&
3354 SDL(ro->ro_rt->rt_gateway)->sdl_alen != 0))) {
3356 ro->ro_rt->generation_id = route_generation;
3359 if (ro->ro_rt != NULL)
3360 RT_UNLOCK(ro->ro_rt);