From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 5 10:55:46 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C6ED16A4CE; Fri, 5 Mar 2004 10:55:46 -0800 (PST) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3160C43D31; Fri, 5 Mar 2004 10:55:46 -0800 (PST) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (IDENT:brdavis@localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.12.10/8.12.3) with ESMTP id i25ItVRH020023; Fri, 5 Mar 2004 10:55:31 -0800 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.12.10/8.12.3/Submit) id i25ItU1d020021; Fri, 5 Mar 2004 10:55:30 -0800 Date: Fri, 5 Mar 2004 10:55:30 -0800 From: Brooks Davis To: Stefan `Sec` Zehl Message-ID: <20040305185527.GA16862@Odin.AC.HMC.Edu> References: <20040304191443.67E9B1C8BA@ice.42.org> <200403041920.i24JK826047989@freefall.freebsd.org> <20040305181852.GC21713@ice.42.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040305181852.GC21713@ice.42.org> User-Agent: Mutt/1.5.4i X-Virus-Scanned: by amavisd-milter (http://amavis.org/) on odin.ac.hmc.edu cc: freebsd-bugs@freebsd.org cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: kern/63772: tap device / exclusive open problem X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2004 18:55:46 -0000 On Fri, Mar 05, 2004 at 07:18:52PM +0100, Stefan `Sec` Zehl wrote: > On Thu, Mar 04, 2004 at 11:20 -0800, FreeBSD-gnats-submit@FreeBSD.org wrote: > > Thank you very much for your problem report. > > It has the internal identification `kern/63772'. > > I have checked the if_tap.c in the current and stable branches, and was > thus able to come up with an easy fix: > > --- if_tap.c Tue Feb 24 05:35:44 2004 > +++ if_tap.c.neu Fri Mar 5 19:09:12 2004 > @@ -323,6 +323,9 @@ > KASSERT(!(tp->tap_flags & TAP_OPEN), > ("%s flags is out of sync", tp->tap_if.if_xname)); > > + if (tp->tap_flags & TAP_OPEN) > + return (EBUSY); > + > bcopy(tp->arpcom.ac_enaddr, tp->ether_addr, sizeof(tp->ether_addr)); > > tp->tap_pid = td->td_proc->p_pid; > > > After this simple change, openvpn works with multiple tunnels again. There's obviously something complicated going on since with INVARIANTS enabled this would either return EBUSY or panic. This should definitely not be committed as is. -- Brooks