Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Mar 2004 10:55:30 -0800
From:      Brooks Davis <brooks@one-eyed-alien.net>
To:        Stefan `Sec` Zehl <sec@42.org>
Cc:        FreeBSD-gnats-submit@freebsd.org
Subject:   Re: kern/63772: tap device / exclusive open problem
Message-ID:  <20040305185527.GA16862@Odin.AC.HMC.Edu>
In-Reply-To: <20040305181852.GC21713@ice.42.org>
References:  <20040304191443.67E9B1C8BA@ice.42.org> <200403041920.i24JK826047989@freefall.freebsd.org> <20040305181852.GC21713@ice.42.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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