From pjchilds@al.imforei.apana.org.au  Sun Jun  9 03:19:16 1996
Received: from al.imforei.apana.org.au (al.imforei.apana.org.au [202.12.89.41])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id DAA04384
          for <FreeBSD-gnats-submit@freebsd.org>; Sun, 9 Jun 1996 03:19:11 -0700 (PDT)
Received: (from pjchilds@localhost) by al.imforei.apana.org.au (8.7.5/8.7.3) id TAA24005; Sun, 9 Jun 1996 19:49:03 +0930 (CST)
Message-Id: <199606091019.TAA24005@al.imforei.apana.org.au>
Date: Sun, 9 Jun 1996 19:49:03 +0930 (CST)
From: Peter Childs <pjchilds@imforei.apana.org.au>
Reply-To: pjchilds@imforei.apana.org.au
To: FreeBSD-gnats-submit@freebsd.org
Subject: kernel tunnel bug
X-Send-Pr-Version: 3.2

>Number:         1304
>Category:       kern
>Synopsis:       incorrect return
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun  9 03:20:01 PDT 1996
>Closed-Date:    Sun Jun 9 04:05:43 PDT 1996
>Last-Modified:  Sun Jun  9 04:06:49 PDT 1996
>Originator:     Peter Childs
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
Peter Childs  ---  http://www.imforei.apana.org.au/~pjchilds
>Environment:

 2.1-stable CTM'd to 116.

>Description:

 Line 150 of /sys/net/if_tun.c returns ENXIO when it should return
 EBUSY.

 This can cause problems if the ppp code assumes because
 device 0 returned ENXIO that no other devices will be available
 (which would be sensible), and terminates its loop without assigning
 a tunnel device.
 
 The current stable :) os.c code doesn't, but thats broken
 in its own special way anyway :)

>How-To-Repeat:

 Glance at the code..

>Fix:
	
 change

  return ENXIO;

 to
  
  return EBUSY;


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: gpalmer 
State-Changed-When: Sun Jun 9 04:05:43 PDT 1996 
State-Changed-Why:  
Fixed in rev. 1.6.4.2 of /sys/net/if_tun.c 
>Unformatted:
