Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Oct 2003 13:52:22 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 39333 for review
Message-ID:  <200310072052.h97KqMoB080913@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=39333

Change 39333 by sam@sam_ebb on 2003/10/07 13:51:54

	must lock route when the caller provided a route but not
	interface; otherwise the subsequent unlock blows up

Affected files ...

.. //depot/projects/netperf/sys/netinet6/ip6_output.c#10 edit

Differences ...

==== //depot/projects/netperf/sys/netinet6/ip6_output.c#10 (text+ko) ====

@@ -609,6 +609,7 @@
 			/* XXX in6_ifstat_inc(ifp, ifs6_out_discard); */
 			goto bad;
 		}
+		/* XXX rt not locked */
 		ia = ifatoia6(ro->ro_rt->rt_ifa);
 		ifp = ro->ro_rt->rt_ifp;
 		ro->ro_rt->rt_use++;
@@ -694,10 +695,11 @@
 		 * ``net'' ff00::/8).
 		 */
 		if (ifp == NULL) {
-			if (ro->ro_rt == 0) {
+			if (ro->ro_rt == 0)
 				ro->ro_rt = rtalloc1((struct sockaddr *)
 						&ro->ro_dst, 0, 0UL);
-			}
+			else
+				RT_LOCK(ro->ro_rt);
 			if (ro->ro_rt == 0) {
 				ip6stat.ip6s_noroute++;
 				error = EHOSTUNREACH;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310072052.h97KqMoB080913>