From steve@Watt.COM  Fri Apr 13 13:39:08 2001
Return-Path: <steve@Watt.COM>
Received: from wattres.Watt.COM (spare78.biz.net [208.177.80.78])
	by hub.freebsd.org (Postfix) with ESMTP id 9B32637B424
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 13 Apr 2001 13:39:06 -0700 (PDT)
	(envelope-from steve@Watt.COM)
Received: (from steve@localhost)
	by wattres.Watt.COM (8.11.3/8.11.2) id f3DKd5555776;
	Fri, 13 Apr 2001 13:39:05 -0700 (PDT)
	(envelope-from steve)
Message-Id: <200104132039.f3DKd5555776@wattres.Watt.COM>
Date: Fri, 13 Apr 2001 13:39:05 -0700 (PDT)
From: Steve Watt <steve@Watt.COM>
Reply-To: steve@Watt.COM
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: gifconfig in rc.conf ignored if ipv6_enable off
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         26543
>Category:       conf
>Synopsis:       gifconfig in rc.conf ignored if ipv6_enable off
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    brian
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 13 13:40:01 PDT 2001
>Closed-Date:    Sun Jun 3 23:47:42 PDT 2001
>Last-Modified:  Sun Jun 03 23:48:22 PDT 2001
>Originator:     Steve Watt
>Release:        FreeBSD 4.3-RC i386
>Organization:
Watt Consultants
>Environment:
System: FreeBSD wattres.Watt.COM 4.3-RC FreeBSD 4.3-RC #4: Fri Apr 6 09:09:29 PDT 2001 root@wattres.Watt.COM:/old/usr/obj/usr/src/sys/WATTRES i386

i686-class box
4.3RC cvsupped 6 Apr 0556Z

>Description:
Trying to do IPsec without IPv6 set up.  I added the following to
/etc/rc.conf (IP addresses beaten up):

} ipsec_enable="YES"
} gif_interfaces="gif0"
} gifconfig_gif0="123.102.201.6 205.15.252.155"
} ifconfig_gif0="inet 172.30.166.128 netmask 255.255.255.192 192.168.1.1 netmask 255.255.255.0"

ipv6_enable is *NOT* set in rc.conf; I don't really want to fiddle
with that stuff yet.

On bootup, the gifconfig stuff only happens (in rc.network6) if
ipv6_enable is on.  However, gif interfaces are useful in more places
than just ipv6.


>How-To-Repeat:
Add a gif_interfaces list to rc.conf, observe that gifconfig doesn't get
run during startup.

>Fix:
Move the gifconfig out of rc.network6 into rc.network in some appropriate
place.
>Release-Note:
>Audit-Trail:

From: Brooks Davis <brooks@one-eyed-alien.net>
To: freebsd-gnats-submit@FreeBSD.org, steve@Watt.COM
Cc:  
Subject: Re: conf/26543: gifconfig in rc.conf ignored if ipv6_enable off
Date: Fri, 1 Jun 2001 18:52:20 -0700

 --bg08WKrSYDhXBjb5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 I've attached a patch to the end of this message the moves gifconfig to
 /etc/rc.network from /etc/rc.network6.  When applied you may see a small
 note with regard to /etc/defaults/rc.conf due to the fact that I deleted
 to unrelated changes from that diff.
 
 -- Brooks
 
 --=20
 Any statement of the form "X is the one, true Y" is FALSE.
 PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4
 
 Index: rc.network
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/src/etc/rc.network,v
 retrieving revision 1.95
 diff -u -r1.95 rc.network
 --- rc.network	2001/05/18 18:10:02	1.95
 +++ rc.network	2001/06/02 01:21:19
 @@ -129,6 +129,9 @@
  		fi
  	done
 =20
 +	# gifconfig
 +	network_gif_setup
 +
  	# Set up all the network interfaces, calling startup scripts if needed
  	#
  	case ${network_interfaces} in
 @@ -767,3 +770,23 @@
          }' < $host_conf > $nsswitch_conf
  }
 =20
 +network_gif_setup() {
 +	case ${gif_interfaces} in
 +	[Nn][Oo] | '')
 +		;;
 +	*)
 +		for i in ${gif_interfaces}; do
 +			eval peers=3D\$gifconfig_$i
 +			case ${peers} in
 +			'')
 +				continue
 +				;;
 +			*)
 +				gifconfig $i ${peers}
 +				;;
 +			esac
 +		done
 +		;;
 +	esac
 +}
 +}
 Index: rc.network6
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/src/etc/rc.network6,v
 retrieving revision 1.18
 diff -u -r1.18 rc.network6
 --- rc.network6	2001/04/26 17:33:37	1.18
 +++ rc.network6	2001/06/02 01:21:34
 @@ -125,9 +125,6 @@
  		;;
  	esac
 =20
 -	# gifconfig
 -	network6_gif_setup
 -
  	# setting up interfaces
  	network6_interface_setup $ipv6_network_interfaces
 =20
 @@ -337,26 +334,6 @@
  		ifconfig $1 up
  		rtsol $1
  	fi
 -}
 -
 -network6_gif_setup() {
 -	case ${gif_interfaces} in
 -	[Nn][Oo] | '')
 -		;;
 -	*)
 -		for i in ${gif_interfaces}; do
 -			eval peers=3D\$gifconfig_$i
 -			case ${peers} in
 -			'')
 -				continue
 -				;;
 -			*)
 -				gifconfig $i ${peers}
 -				;;
 -			esac
 -		done
 -		;;
 -	esac
  }
 =20
  network6_stf_setup() {
 Index: defaults/rc.conf
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /home/ncvs/src/etc/defaults/rc.conf,v
 retrieving revision 1.108
 diff -u -r1.108 rc.conf
 --- defaults/rc.conf	2001/05/25 01:46:39	1.108
 +++ defaults/rc.conf	2001/06/02 01:12:40
 @@ -93,6 +95,11 @@
  sppp_interfaces=3D""		# List of sppp interfaces.
  #sppp_interfaces=3D"isp0"		# example: sppp over ISDN
  #spppconfig_isp0=3D"authproto=3Dchap myauthname=3Dfoo myauthsecret=3D'top =
 secret' hisauthname=3Dsome-gw hisauthsecret=3D'another secret'"
 +gif_interfaces=3D"NO"		# List of GIF tunnels (or "NO").
 +#gif_interfaces=3D"gif0 gif1"	# Examples typically for a router.
 +				# Choose correct tunnel addrs.
 +#gifconfig_gif0=3D"10.1.1.1 10.1.2.1"	# Examples typically for a router.
 +#gifconfig_gif1=3D"10.1.1.2 10.1.2.2"	# Examples typically for a router.
 =20
  # User ppp configuration.
  ppp_enable=3D"NO"		# Start user-ppp (or NO).
 @@ -252,11 +259,6 @@
  mroute6d_program=3D"/usr/sbin/pim6dd"	# Name of IPv6 multicast routing
  					# daemon.
  mroute6d_flags=3D""		# Flags to IPv6 multicast routing daemon.
 -gif_interfaces=3D"NO"		# List of GIF tunnels (or "NO").
 -#gif_interfaces=3D"gif0 gif1"	# Examples typically for a router.
 -				# Choose correct tunnel addrs.
 -#gifconfig_gif0=3D"10.1.1.1 10.1.2.1"	# Examples typically for a router.
 -#gifconfig_gif1=3D"10.1.1.2 10.1.2.2"	# Examples typically for a router.
  stf_interface_ipv4addr=3D""	# Local IPv4 addr for 6to4 IPv6 over IPv4
  				# tunneling interface. Specify this entry
  				# to enable 6to4 interface.
 
 --bg08WKrSYDhXBjb5
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.4 (GNU/Linux)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE7GEbTXY6L6fI4GtQRAn3sAJ9N/eR1gpFxou+xlJJaHHAOK+X8RwCeN4RT
 d4vjSorj6LXiee2/Jn+S6d4=
 =dhL8
 -----END PGP SIGNATURE-----
 
 --bg08WKrSYDhXBjb5--
Responsible-Changed-From-To: freebsd-bugs->brian 
Responsible-Changed-By: brian 
Responsible-Changed-When: Sun Jun 3 04:57:53 PDT 2001 
Responsible-Changed-Why:  
I'll apply this 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26543 
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Sun Jun 3 23:47:42 PDT 2001 
State-Changed-Why:  
Applied to -current.  I'll MFC in 3 weeks. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=26543 
>Unformatted:
