Date: Sun, 16 Sep 2007 22:00:55 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 126490 for review Message-ID: <200709162200.l8GM0tdq080398@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126490 Change 126490 by kmacy@kmacy_home:ethng on 2007/09/16 22:00:39 cache the route in the inpcb this is currently half-complete at best as it doesn't yet re-validate the rt_entry against a gen_count as is intended Affected files ... .. //depot/projects/ethng/src/sys/netinet/udp_usrreq.c#4 edit Differences ... ==== //depot/projects/ethng/src/sys/netinet/udp_usrreq.c#4 (text+ko) ==== @@ -967,8 +967,23 @@ if (unlock_udbinfo) INP_INFO_WUNLOCK(&udbinfo); + + /* + * XXX need to validate + */ + if (inp->inp_route.ro_rt == NULL) { + struct sockaddr_in *dst = (struct sockaddr_in *)&inp->inp_route.ro_dst; + struct ip *ip = mtod(m, struct ip *); + + bzero(dst, sizeof(*dst)); + dst->sin_family = AF_INET; + dst->sin_len = sizeof(*dst); + dst->sin_addr = ip->ip_dst; + + rtalloc_ign(&inp->inp_route, 0); + } m->m_pkthdr.rss_hash = inp->inp_rss_hash; - error = ip_output(m, inp->inp_options, NULL, ipflags, + error = ip_output(m, inp->inp_options, &inp->inp_route, ipflags, inp->inp_moptions, inp); INP_UNLOCK(inp); return (error);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709162200.l8GM0tdq080398>