From nobody@FreeBSD.org  Sat Feb 24 19:22:45 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 86E1916A401
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 24 Feb 2007 19:22:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 782B413C481
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 24 Feb 2007 19:22:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1OJMjY7066884
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 24 Feb 2007 19:22:45 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l1OJMj9Q066883;
	Sat, 24 Feb 2007 19:22:45 GMT
	(envelope-from nobody)
Message-Id: <200702241922.l1OJMj9Q066883@www.freebsd.org>
Date: Sat, 24 Feb 2007 19:22:45 GMT
From: Stefan Bethke<stb@lassitu.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Enable cloning of tun/tap through rc.conf cloned_interfaces
X-Send-Pr-Version: www-3.0

>Number:         109498
>Category:       conf
>Synopsis:       [patch] [request] Enable cloning of tun/tap through rc.conf cloned_interfaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 24 19:30:06 GMT 2007
>Closed-Date:    Sat Feb 23 03:06:10 UTC 2008
>Last-Modified:  Sat Feb 23 03:06:10 UTC 2008
>Originator:     Stefan Bethke
>Release:        FreeBSD 6.2
>Organization:
>Environment:
>Description:
tap(5) and tun(5) do not support the create/destroy methods for cloning,
but rely on their character devices being opened to create the respective
network interfaces. This makes it awkward to create tap or tun interfaces
early enough in the boot process to i.e. be able to add a tap interface to
a bridge, or reference an interface from a firewall script.

>How-To-Repeat:

>Fix:
--- /usr/src/etc/network.subr   Mon Nov  6 17:46:06 2006
+++ network.subr        Sat Feb 24 19:59:17 2007
@@ -429,7 +429,14 @@
        _prefix=
        _list=
        for ifn in ${cloned_interfaces}; do
-               ifconfig ${ifn} create
+               case ${ifn} in
+                       tap*|tun*)
+                               echo -n >/dev/${ifn}
+                               ;;
+                       *)
+                               ifconfig ${ifn} create
+                               ;;
+               esac
                if [ $? -eq 0 ]; then
                        _list="${_list}${_prefix}${ifn}"
                        [ -z "$_prefix" ] && _prefix=' '
r
>Release-Note:
>Audit-Trail:

From: "Alexander V. Chernikov" <admin@su29.net>
To: bug-followup@FreeBSD.org, stb@lassitu.de
Cc:  
Subject: Re: conf/109498: [patch] [request] Enable cloning of tun/tap through
 rc.conf cloned_interfaces
Date: Fri, 22 Feb 2008 23:10:42 +0300

 Cloning was fixed in rev. 1.162 of  net/if_tun.c (same for if_tap) on 
 Feb 2007
 MFC to 6.3 (rev. 1.152.2.6) on Mar 4 2007
 Original PR: kern/105228/
 
 /
 
State-Changed-From-To: open->closed 
State-Changed-By: linimon 
State-Changed-When: Sat Feb 23 03:05:50 UTC 2008 
State-Changed-Why:  
Apparently this has now been fixed in a slightly different way. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109498 
>Unformatted:
