kern/63772: tap device / exclusive open problem

Stefan `Sec` Zehl sec at 42.org
Fri Mar 5 10:20:26 PST 2004


The following reply was made to PR kern/63772; it has been noted by GNATS.

From: Stefan `Sec` Zehl <sec at 42.org>
To: FreeBSD-gnats-submit at FreeBSD.org, freebsd-bugs at FreeBSD.org
Cc:  
Subject: Re: kern/63772: tap device / exclusive open problem
Date: Fri, 5 Mar 2004 19:18:52 +0100

 On Thu, Mar 04, 2004 at 11:20 -0800, FreeBSD-gnats-submit at 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.
 
 I hope this can be committed.
 
 CU,
     Sec
 -- 
 "Caution, you have *no chance* of operating this device successfully
 unless you have read the instruction manual."
 - from a card covering the screen of an Amstrad phone


More information about the freebsd-bugs mailing list