Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  4 Mar 2004 20:14:43 +0100 (CET)
From:      Stefan `Sec` Zehl <sec@42.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   kern/63772: tap device / exclusive open problem
Message-ID:  <20040304191443.67E9B1C8BA@ice.42.org>
Resent-Message-ID: <200403041920.i24JK9Bx048000@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         63772
>Category:       kern
>Synopsis:       tap device / exclusive open problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 04 11:20:08 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Stefan `Sec` Zehl
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
>Environment:
System: FreeBSD dell 5.2-CURRENT FreeBSD 5.2-CURRENT #3: Thu Mar 4 17:37:09 CET 2004 root@dell:/usr/obj/usr/src/sys/DELL i386



        
>Description:

tap(4) says:

     The Ethernet tunnel device, normally /dev/tapN, is exclusive-open (it
     cannot be opened if it is already open) and is restricted to the super-
     user.  A read() call will return an error (EHOSTDOWN) if the interface is

but this appears to be untrue.

The problem affects openvpn (1.6r2) which always ends up using tap0,            even if it already in use.

>How-To-Repeat:

I can have multiple processes reading and writing on a single tap inerface.

dell:~#cat /dev/tap0 &
[1] 29197
dell:~#cat /dev/tap0 &
[2] 29198

dell:~#echo> /dev/tap0 ; echo $?
0
dell:~#jobs
[1]  - running    cat /dev/tap0
[2]  + running    cat /dev/tap0


>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:



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