From bicknell@ussenterprise.ufp.org  Wed Jan 10 18:27:49 2001
Return-Path: <bicknell@ussenterprise.ufp.org>
Received: from ussenterprise.ufp.org (unknown [209.249.106.101])
	by hub.freebsd.org (Postfix) with ESMTP id AC68837B400
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 10 Jan 2001 18:27:48 -0800 (PST)
Received: (from bicknell@localhost)
	by ussenterprise.ufp.org (8.11.1/8.11.1) id f0B2RmI04791;
	Wed, 10 Jan 2001 21:27:48 -0500 (EST)
	(envelope-from bicknell)
Message-Id: <200101110227.f0B2RmI04791@ussenterprise.ufp.org>
Date: Wed, 10 Jan 2001 21:27:48 -0500 (EST)
From: bicknell@ufp.org
Reply-To: bicknell@ufp.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: rc.conf ipv6 missing options
X-Send-Pr-Version: 3.2

>Number:         24239
>Category:       conf
>Synopsis:       rc.conf ipv6 missing options
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ume
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 10 18:30:00 PST 2001
>Closed-Date:    Sun Mar 18 08:08:01 PST 2001
>Last-Modified:  Sun Mar 18 08:08:48 PST 2001
>Originator:     Leo Bicknell
>Release:        FreeBSD 4.2-RELEASE i386
>Organization:
>Environment:

FreeBSD ussenterprise.ufp.org 4.2-RELEASE FreeBSD 4.2-RELEASE #0: 
Fri Jan  5 14:05:35 EST 2001     
root@ussenterprise.ufp.org:/usr/src/sys/compile/USSENTERPRISE  i386

>Description:

	In /etc/rc.conf is documented the manual configuration for
IPv6:

#ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64" # Sample alias entry

	Unfortunately, this does not allow you to configure multiple
aliases, like the IPv4 code does.  The code should also support 
variables like:

#ipv6_ifconfig_ed0_alias0="fec0:0:0:5::2 prefixlen 64" # Sample alias entry
#ipv6_ifconfig_ed0_alias1="fec0:0:0:5::3 prefixlen 64" # Sample alias entry

	And so on.

>How-To-Repeat:

	Not really anything to repeat, now is there. :-)

>Fix:

	Borrowing from the code that is in /etc/rc.network (v4) to 
create a v6 example I recomend replacing this v6 code in /etc/rc.network6:

network6_interface_setup() {                                                              
[snip]                                                                                    
        for i in $ipv6_network_interfaces; do                 
[snip]                                                            
                eval ipv6_ifconfig=\$ipv6_ifconfig_$i                   
                if [ -n "${ipv6_ifconfig}" ]; then          
                        rtsol_available=no                        
                        rtsol_interface=no                              
                        ifconfig $i inet6 ${ipv6_ifconfig} alias  
                fi                                                

	With something more along these lines:

                # Check to see if aliases need to be added                
                #                                                         
                alias=0                                                   
                while : ; do                                              
                        eval ifconfig_args=\$ipv6_ifconfig_${ifn}_alias${alias}
                        if [ -n "${ifconfig_args}" ]; then                                
                                if [ -n "${ipv6_ifconfig}" ]; then                        
                                       rtsol_available=no                                 
                                       rtsol_interface=no                                 
                                       ifconfig ${ifn} inet6 ${ifconfig_args} alias       
                                       alias=`expr ${alias} + 1`                          
                                fi                                                        
                        else                                                       
                                break;                                             
                        fi                                                         
                done                                                               


	I'm not sure I'm doing the right things with the "rtsol_available"
and "rtsol_interface", or that there aren't other things that should be
done, so consider this an example only.


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ume 
Responsible-Changed-By: ume 
Responsible-Changed-When: Sat Mar 17 09:00:52 PST 2001 
Responsible-Changed-Why:  
I'll support it later. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=24239 
State-Changed-From-To: open->closed 
State-Changed-By: ume 
State-Changed-When: Sun Mar 18 08:08:01 PST 2001 
State-Changed-Why:  
Thanks!  I just committed it. 

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