From owner-freebsd-stable Thu Dec 9 9:19:45 1999 Delivered-To: freebsd-stable@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 5EC5A155AC for ; Thu, 9 Dec 1999 09:19:42 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id JAA29296 for ; Thu, 9 Dec 1999 09:19:41 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id JAA37804; Thu, 9 Dec 1999 09:19:40 -0800 (PST) (envelope-from jdp@polstra.com) Date: Thu, 9 Dec 1999 09:19:40 -0800 (PST) Message-Id: <199912091719.JAA37804@vashon.polstra.com> To: stable@freebsd.org Subject: Re: Route table leaks In-Reply-To: <199912090458.UAA01426@gndrsh.dnsmgr.net> References: <199912090458.UAA01426@gndrsh.dnsmgr.net> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I have just now committed the fix in -current for the route table leaks that started this thread. It is in revision 1.57 of "src/sys/net/route.c" and it should appear on the mirror sites within an hour. Below is the equivalent patch for -stable. I would appreciate it if those of you who think you have been experiencing leaks in -stable would try the patch and let me know whether it fixes the leaks for you. If you can let me know within a couple days then maybe I can persuade Jordan to let me merge it in time for 3.4-RELEASE. John Index: route.c =================================================================== RCS file: /home/ncvs/src/sys/net/route.c,v retrieving revision 1.50.2.1 diff -u -r1.50.2.1 route.c --- route.c 1999/08/29 16:28:32 1.50.2.1 +++ route.c 1999/12/09 17:11:57 @@ -87,9 +87,7 @@ rtalloc(ro) register struct route *ro; { - if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP)) - return; /* XXX */ - ro->ro_rt = rtalloc1(&ro->ro_dst, 1, 0UL); + rtalloc_ign(ro, 0UL); } void @@ -97,8 +95,17 @@ register struct route *ro; u_long ignore; { - if (ro->ro_rt && ro->ro_rt->rt_ifp && (ro->ro_rt->rt_flags & RTF_UP)) - return; /* XXX */ + struct rtentry *rt; + int s; + + if ((rt = ro->ro_rt) != NULL) { + if (rt->rt_ifp != NULL && rt->rt_flags & RTF_UP) + return; + /* XXX - We are probably always at splnet here already. */ + s = splnet(); + RTFREE(rt); + splx(s); + } ro->ro_rt = rtalloc1(&ro->ro_dst, 1, ignore); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message