From nobody@FreeBSD.org  Sun Jun 20 17:51:27 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7216E1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Jun 2010 17:51:27 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 60D5E8FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Jun 2010 17:51:27 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o5KHpR53004775
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 20 Jun 2010 17:51:27 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o5KHpRSj004774;
	Sun, 20 Jun 2010 17:51:27 GMT
	(envelope-from nobody)
Message-Id: <201006201751.o5KHpRSj004774@www.freebsd.org>
Date: Sun, 20 Jun 2010 17:51:27 GMT
From: Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: rc script for stf does not honour create_flags
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         148017
>Category:       conf
>Synopsis:       [stf] [patch] rc script for stf does not honour create_flags
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    hrs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jun 20 18:00:11 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Jun 21 03:44:34 UTC 2010
>Originator:     Marcin Wisnicki
>Release:        8.1-PRERELEASE
>Organization:
>Environment:
FreeBSD ghost.pnet.one.pl 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #3: Sun Jun  6 21:14:57 CEST 2010     root@ghost.pnet.one.pl:/home/obj/usr/src/sys/SERWER_DDB  i386
>Description:
If I enable 6to4 with stf_interface_ipv4addr there is no way to set
configuration for created interface using create_args_stf0 even though
startup scripts create such [interface].

[nb: bugmeister edit]

>How-To-Repeat:
cat << EOT >> /etc/rc.conf
ipv6_enable="YES"
stf_interface_ipv4addr="YOUR IP"
create_args_stf0="group ext"
EOT
ifconfig stf0 destroy
/etc/rc.d/network_ipv6 restart
ifconfig -g ext
# no interfaces listed
>Fix:
Apply attached patch

Patch attached with submission follows:

--- etc/network.subr;1	2010-06-06 23:33:07.000000000 +0200
+++ etc/network.subr	2010-06-20 19:05:10.000000000 +0200
@@ -1034,7 +1034,7 @@
 			esac
 			;;
 		esac
-		ifconfig stf0 create >/dev/null 2>&1
+		ifconfig stf0 create `get_if_var stf0 create_args_IF` >/dev/null 2>&1
 		ifconfig stf0 inet6 2002:${ipv4_in_hexformat}:${stf_interface_ipv6_slaid:-0}:${stf_interface_ipv6_ifid} \
 			prefixlen ${stf_prefixlen}
 		# disallow packets to malicious 6to4 prefix


>Release-Note:
>Audit-Trail:

From: =?UTF-8?Q?Marcin_Wi=C5=9Bnicki?= <mwisnicki@gmail.com>
To: bug-followup <bug-followup@FreeBSD.org>, 
	"mwisnicki+freebsd" <mwisnicki+freebsd@gmail.com>
Cc:  
Subject: Re: misc/148017: rc script for stf does not honour create_flags
Date: Sun, 20 Jun 2010 20:18:07 +0200

 Err... I meant "create such interface".
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Jun 21 03:27:54 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=148017 
Responsible-Changed-From-To: freebsd-rc->hrs 
Responsible-Changed-By: hrs 
Responsible-Changed-When: Mon Jun 21 03:42:41 UTC 2010 
Responsible-Changed-Why:  
I'll take this. 

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