Lines Matching refs:src_rt

6224 	struct route            src_rt;  in ifnet_cached_rtlookup_inet()  local
6227 dst = SIN(&src_rt.ro_dst); in ifnet_cached_rtlookup_inet()
6229 ifp_src_route_copyout(ifp, &src_rt); in ifnet_cached_rtlookup_inet()
6231 if (ROUTE_UNUSABLE(&src_rt) || src_ip.s_addr != dst->sin_addr.s_addr) { in ifnet_cached_rtlookup_inet()
6232 ROUTE_RELEASE(&src_rt); in ifnet_cached_rtlookup_inet()
6234 SOCKADDR_ZERO(&src_rt.ro_dst, sizeof(src_rt.ro_dst)); in ifnet_cached_rtlookup_inet()
6235 dst->sin_len = sizeof(src_rt.ro_dst); in ifnet_cached_rtlookup_inet()
6240 VERIFY(src_rt.ro_rt == NULL); in ifnet_cached_rtlookup_inet()
6241 src_rt.ro_rt = rtalloc1_scoped(SA(dst), in ifnet_cached_rtlookup_inet()
6244 if (src_rt.ro_rt != NULL) { in ifnet_cached_rtlookup_inet()
6246 struct rtentry *rte = src_rt.ro_rt; in ifnet_cached_rtlookup_inet()
6248 ifp_src_route_copyin(ifp, &src_rt); in ifnet_cached_rtlookup_inet()
6249 src_rt.ro_rt = rte; in ifnet_cached_rtlookup_inet()
6253 return src_rt.ro_rt; in ifnet_cached_rtlookup_inet()
6259 struct route_in6 src_rt; in ifnet_cached_rtlookup_inet6() local
6261 ifp_src_route6_copyout(ifp, &src_rt); in ifnet_cached_rtlookup_inet6()
6263 if (ROUTE_UNUSABLE(&src_rt) || in ifnet_cached_rtlookup_inet6()
6264 !IN6_ARE_ADDR_EQUAL(src_ip6, &src_rt.ro_dst.sin6_addr)) { in ifnet_cached_rtlookup_inet6()
6265 ROUTE_RELEASE(&src_rt); in ifnet_cached_rtlookup_inet6()
6266 if (src_rt.ro_dst.sin6_family != AF_INET6) { in ifnet_cached_rtlookup_inet6()
6267 SOCKADDR_ZERO(&src_rt.ro_dst, sizeof(src_rt.ro_dst)); in ifnet_cached_rtlookup_inet6()
6268 src_rt.ro_dst.sin6_len = sizeof(src_rt.ro_dst); in ifnet_cached_rtlookup_inet6()
6269 src_rt.ro_dst.sin6_family = AF_INET6; in ifnet_cached_rtlookup_inet6()
6271 src_rt.ro_dst.sin6_scope_id = in6_addr2scopeid(ifp, src_ip6); in ifnet_cached_rtlookup_inet6()
6272 bcopy(src_ip6, &src_rt.ro_dst.sin6_addr, in ifnet_cached_rtlookup_inet6()
6273 sizeof(src_rt.ro_dst.sin6_addr)); in ifnet_cached_rtlookup_inet6()
6275 if (src_rt.ro_rt == NULL) { in ifnet_cached_rtlookup_inet6()
6276 src_rt.ro_rt = rtalloc1_scoped( in ifnet_cached_rtlookup_inet6()
6277 SA(&src_rt.ro_dst), 0, 0, in ifnet_cached_rtlookup_inet6()
6280 if (src_rt.ro_rt != NULL) { in ifnet_cached_rtlookup_inet6()
6282 struct rtentry *rte = src_rt.ro_rt; in ifnet_cached_rtlookup_inet6()
6284 ifp_src_route6_copyin(ifp, &src_rt); in ifnet_cached_rtlookup_inet6()
6285 src_rt.ro_rt = rte; in ifnet_cached_rtlookup_inet6()
6290 return src_rt.ro_rt; in ifnet_cached_rtlookup_inet6()