kern/173475: [tun] tun(4) stays opened by PID after process is terminated

John Baldwin jhb at freebsd.org
Wed Jan 23 16:32:39 UTC 2013


On Wednesday, January 23, 2013 2:00:01 am Emanuel Haupt wrote:
> The following reply was made to PR kern/173475; it has been noted by GNATS.
> 
> From: Emanuel Haupt <ehaupt at FreeBSD.org>
> To: bug-followup at FreeBSD.org, IZ-FreeBSD0701 at hs-karlsruhe.de
> Cc:  
> Subject: Re: kern/173475: [tun] tun(4) stays opened by PID after process is
>  terminated
> Date: Wed, 23 Jan 2013 07:59:07 +0100
> 
>  Could you please try the following vpnc patch? It tries to work around
>  this deadlock situation:
>  
>  http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/175067
>  
>  However, the underlying problem with if_tun should be looked at
>  separately in this PR.

This is not a bug in tun, it is a bug in vpnc.  (I also see this with 
openconnect).  The problem in the case of openconnect is that the process
calls vpnc-script while is still holds an open file descriptor on
/dev/tunX.  The calling processes need to be fixed to close /dev/tunX
before calling the script, or they need to handle destroying of the
tunX interfaces themselves rather than letting the script do it.

-- 
John Baldwin


More information about the freebsd-net mailing list