Lines Matching refs:ro_rt

694 	if (!select_srcif || (ro != NULL && ro->ro_rt != NULL &&
695 (ro->ro_rt->rt_flags & RTF_UP) &&
696 ro->ro_rt->generation_id == route_generation &&
698 if (ro != NULL && ro->ro_rt != NULL) {
699 ifa = ro->ro_rt->rt_ifa;
712 if (ifscope != IFSCOPE_NONE || (ro != NULL && ro->ro_rt != NULL)) {
716 rt_ifp = (ro->ro_rt != NULL) ? ro->ro_rt->rt_ifp : NULL;
730 ro->ro_rt->generation_id != route_generation)
753 if (ro->ro_rt != NULL) {
810 if (ron->ro_rt != NULL)
811 RT_LOCK(ron->ro_rt);
812 if ((ron->ro_rt != NULL &&
813 ((ron->ro_rt->rt_flags & (RTF_UP | RTF_LLINFO)) !=
815 ron->ro_rt->generation_id != route_generation ||
817 (ifa->ifa_ifp != ron->ro_rt->rt_ifp && !proxied_ifa))))) ||
820 if (ron->ro_rt != NULL) {
821 RT_UNLOCK(ron->ro_rt);
822 rtfree(ron->ro_rt);
823 ron->ro_rt = NULL;
827 if (ron->ro_rt == NULL) {
829 if (ron->ro_rt != NULL)
830 RT_LOCK(ron->ro_rt);
831 if (ron->ro_rt == NULL ||
832 !(ron->ro_rt->rt_flags & RTF_LLINFO) ||
833 !IN6_ARE_ADDR_EQUAL(&satosin6(rt_key(ron->ro_rt))->
835 if (ron->ro_rt != NULL) {
836 RT_UNLOCK(ron->ro_rt);
837 rtfree(ron->ro_rt);
838 ron->ro_rt = NULL;
845 ifp = ifp0 = ron->ro_rt->rt_ifp;
857 RT_UNLOCK(ron->ro_rt);
860 RT_UNLOCK(ron->ro_rt);
870 if (ro->ro_rt != NULL)
871 RT_LOCK(ro->ro_rt);
872 if (ro->ro_rt != NULL && (!(ro->ro_rt->rt_flags & RTF_UP) ||
874 ro->ro_rt->generation_id != route_generation ||
877 (ifa->ifa_ifp != ro->ro_rt->rt_ifp && !proxied_ifa))))) {
878 RT_UNLOCK(ro->ro_rt);
879 rtfree(ro->ro_rt);
880 ro->ro_rt = NULL;
882 if (ro->ro_rt == NULL) {
885 if (ro->ro_rt != NULL)
886 RT_UNLOCK(ro->ro_rt);
894 ro->ro_rt = rtalloc1_scoped(
899 if (ro->ro_rt != NULL)
900 RT_LOCK(ro->ro_rt);
908 if (ro->ro_rt != NULL)
909 RT_UNLOCK(ro->ro_rt);
913 if (ro->ro_rt != NULL) {
914 RT_LOCK_ASSERT_HELD(ro->ro_rt);
915 ifp = ifp0 = ro->ro_rt->rt_ifp;
923 boolean_t has_route = (route != NULL && route->ro_rt != NULL);
927 RT_LOCK_ASSERT_HELD(route->ro_rt);
936 !(route->ro_rt->rt_flags & RTF_UP))) {
944 (route->ro_rt->rt_flags & (RTF_UP|RTF_PROXY)) ==
963 RT_UNLOCK(route->ro_rt);
964 rtfree(route->ro_rt);
965 route->ro_rt = NULL;
980 route->ro_rt->generation_id = route_generation;
981 RT_UNLOCK(route->ro_rt);
984 if (ro->ro_rt != NULL)
985 RT_UNLOCK(ro->ro_rt);
1008 (route != NULL && route->ro_rt != NULL &&
1009 route->ro_rt->rt_ifp->if_type == IFT_CELLULAR))) {
1010 if (route != NULL && route->ro_rt != NULL) {
1011 rtfree(route->ro_rt);
1012 route->ro_rt = NULL;
1021 if (ifp == NULL && (route == NULL || route->ro_rt == NULL)) {
1045 *retrt = route->ro_rt; /* ro_rt may be NULL */
1120 if (ro == &sro && rt && rt == sro.ro_rt)