Lines Matching defs:ro

100 ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
161 if (ro == NULL) {
162 ro = &iproute;
163 ro->ro_rt = NULL;
170 route_cache(ro, &ip->ip_dst, &ip->ip_src, m->m_pkthdr.ph_rtableid);
171 dst = &ro->ro_dstsin;
188 if (ro->ro_rt == NULL)
189 ro->ro_rt = rtalloc_mpath(&ro->ro_dstsa,
190 &ip->ip_src.s_addr, ro->ro_tableid);
192 if (ro->ro_rt == NULL) {
198 ia = ifatoia(ro->ro_rt->rt_ifa);
199 if (ISSET(ro->ro_rt->rt_flags, RTF_LOCAL))
202 ifp = if_get(ro->ro_rt->rt_ifidx);
214 mtu = atomic_load_int(&ro->ro_rt->rt_mtu);
218 if (ro->ro_rt->rt_flags & RTF_GATEWAY)
219 dst = satosin(ro->ro_rt->rt_gateway);
255 * still points to the address in "ro". (It may have been
258 dst = &ro->ro_dstsin;
362 (ro && ro->ro_rt && ISSET(ro->ro_rt->rt_flags, RTF_BROADCAST)))) {
386 if ((flags & IP_MTUDISC) && ro && ro->ro_rt &&
387 (ro->ro_rt->rt_locks & RTV_MTU) == 0)
396 error = ip_output_ipsec_send(tdb, m, ro,
422 if (ro == &iproute)
423 rtfree(ro->ro_rt);
424 ro = NULL;
442 error = if_output_tso(ifp, &m, sintosa(dst), ro->ro_rt, mtu);
458 if (ro->ro_tableid != orig_rtableid) {
459 rtfree(ro->ro_rt);
460 ro->ro_tableid = orig_rtableid;
461 ro->ro_rt = icmp_mtudisc_clone(
462 ro->ro_dstsin.sin_addr, ro->ro_tableid, 0);
472 if (rtisvalid(ro->ro_rt) &&
473 ISSET(ro->ro_rt->rt_flags, RTF_HOST) &&
474 !(ro->ro_rt->rt_locks & RTV_MTU)) {
477 rtmtu = atomic_load_int(&ro->ro_rt->rt_mtu);
479 atomic_cas_uint(&ro->ro_rt->rt_mtu, rtmtu,
488 (error = if_output_ml(ifp, &ml, sintosa(dst), ro->ro_rt)))
493 if (ro == &iproute)
494 rtfree(ro->ro_rt);
548 ip_output_ipsec_pmtu_update(struct tdb *tdb, struct route *ro,
555 if (ro != NULL)
556 rt = ro->ro_rt;
568 if (ro != NULL && ro->ro_rt != NULL) {
569 rtfree(ro->ro_rt);
570 ro->ro_rt = rtalloc(&ro->ro_dstsa, RT_RESOLVE,
579 ip_output_ipsec_send(struct tdb *tdb, struct mbuf *m, struct route *ro, int fwd)
626 ip_output_ipsec_pmtu_update(tdb, ro, dst, rtableid,
670 ip_output_ipsec_pmtu_update(tdb, ro, dst, rtableid, 0);