From owner-svn-src-head@FreeBSD.ORG Sat Sep 12 22:22:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C7B7106566C; Sat, 12 Sep 2009 22:22:33 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A81C8FC13; Sat, 12 Sep 2009 22:22:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n8CMMV5J099314; Sat, 12 Sep 2009 22:22:31 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n8CMMV3d099311; Sat, 12 Sep 2009 22:22:31 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200909122222.n8CMMV3d099311@svn.freebsd.org> From: Hiroki Sato Date: Sat, 12 Sep 2009 22:22:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r197145 - in head: etc/defaults share/man/man5 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2009 22:22:33 -0000 Author: hrs Date: Sat Sep 12 22:22:31 2009 New Revision: 197145 URL: http://svn.freebsd.org/changeset/base/197145 Log: The following changes are added because of network_ipv6->rc.d/netif integration: - $ipv6_enable is now obsolete. Instead, IPv6 is enabled by default if the kernel supports it, and $ipv6_network_interfaces is "none" by default. If you want to use IPv6, define $ipv6_network_interfaces and $ifconfig_xxx_ipv6. An interface which is in $network_interfaces and not in $ipv6_network_interfaces will be marked as "inet6 -auto_linklocal ifdisabled" (see ifconfig(8)). - $ipv6_ifconfig_xxx is renamed to ifconfig_xxx_ipv6 for consistency with other address families. The old variables still work but can be removed in the future. Note that ipv6_ifconfig_xxx="..." should be replaced with ifconfig_xxx_ipv6="inet6 ...". - Receiving ICMPv6 Router Advertisement is not automatically enabled even if there is no manual configuration of IPv6 in rc.conf. If you want it, define ifconfig_xxx_ipv6="inet6 ... accept_rtadv". - The rc.d/ip6addrctl now chooses address selection policy based on $ipv6_prefer, not $ipv6_enable. The default is ipv6_prefer=NO. - $router* and $ipv6_router* are replaced with $routed_* and $route6d_* for consistency. The old variables still work but can be removed in the future. MFC after: 3 days Modified: head/etc/defaults/rc.conf head/share/man/man5/rc.conf.5 Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Sat Sep 12 22:19:48 2009 (r197144) +++ head/etc/defaults/rc.conf Sat Sep 12 22:22:31 2009 (r197145) @@ -196,6 +196,8 @@ cloned_interfaces="" # List of cloned n ifconfig_lo0="inet 127.0.0.1" # default loopback device configuration. #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry. #ifconfig_ed0_ipx="ipx 0x00010010" # Sample IPX address family entry. +#ifconfig_ed0_ipv6="inet6 2001:db8:1::1 prefixlen 64" # Sample IPv6 addr entry +#ifconfig_ed0_alias0="inet6 2001:db8:2::1 prefixlen 64" # Sample IPv6 alias #ifconfig_fxp0_name="net0" # Change interface name from fxp0 to net0. #wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device #wlandebug_wlan0="scan+auth+assoc" # Set debug flags with wlanddebug(8) @@ -361,9 +363,9 @@ static_arp_pairs="" # Set to static ARP static_routes="" # Set to static route list (or leave empty). natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. -router_enable="NO" # Set to YES to enable a routing daemon. -router="/sbin/routed" # Name of routing daemon to use if enabled. -router_flags="-q" # Flags for routing daemon. +routed_enable="NO" # Set to YES to enable a routing daemon. +routed_program="/sbin/routed" # Name of routing daemon to use if enabled. +routed_flags="-q" # Flags for routing daemon. mrouted_enable="NO" # Do IPv4 multicast routing. mrouted_program="/usr/local/sbin/mrouted" # Name of IPv4 multicast # routing daemon. You need to @@ -418,8 +420,8 @@ rfcomm_pppd_server_two_channel="3" # Ove icmp_bmcastecho="NO" # respond to broadcast ping packets ### IPv6 options: ### -ipv6_enable="NO" # Set to YES to set up for IPv6. -ipv6_network_interfaces="auto" # List of network interfaces (or "auto"). +ipv6_network_interfaces="none" # List of IPv6 network interfaces + # (or "auto" or "none"). ipv6_defaultrouter="NO" # Set to IPv6 default gateway (or NO). #ipv6_defaultrouter="2002:c058:6301::" # Use this for 6to4 (RFC 3068) ipv6_static_routes="" # Set to static route list (or leave empty). @@ -427,20 +429,19 @@ ipv6_static_routes="" # Set to static r # route toward loopback interface. #ipv6_route_xxx="fec0:0000:0000:0006:: -prefixlen 64 ::1" ipv6_gateway_enable="NO" # Set to YES if this host will be a gateway. -ipv6_router_enable="NO" # Set to YES to enable an IPv6 routing daemon. -ipv6_router="/usr/sbin/route6d" # Name of IPv6 routing daemon. -ipv6_router_flags="" # Flags to IPv6 routing daemon. -#ipv6_router_flags="-l" # Example for route6d with only IPv6 site local + +route6d_enable="NO" # Set to YES to enable an IPv6 routing daemon. +route6d_program="/usr/sbin/route6d" # Name of IPv6 routing daemon. +route6d_flags="" # Flags to IPv6 routing daemon. +#route6d_flags="-l" # Example for route6d with only IPv6 site local # addrs. -#ipv6_router_flags="-q" # If you want to run a routing daemon on an end +#route6d_flags="-q" # If you want to run a routing daemon on an end # node, you should stop advertisement. #ipv6_network_interfaces="ed0 ep0" # Examples for router # or static configuration for end node. # Choose correct prefix value. #ipv6_prefix_ed0="fec0:0000:0000:0001 fec0:0000:0000:0002" # Examples for rtr. #ipv6_prefix_ep0="fec0:0000:0000:0003 fec0:0000:0000:0004" # Examples for rtr. -#ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64" # Sample manual assign entry -#ipv6_ifconfig_ed0_alias0="fec0:0:0:5::2 prefixlen 64" # Sample alias entry. ipv6_default_interface="NO" # Default output interface for scoped addrs. # Now this works only for IPv6 link local # multicast addrs. @@ -482,6 +483,7 @@ ipv6_ipfilter_rules="/etc/ipf6.rules" # # for examples ip6addrctl_enable="YES" # Set to YES to enable default address selection ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages +ipv6_prefer="NO" # Use IPv6 when both IPv4 and IPv6 can be used ############################################################## ### System console options ################################# Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Sat Sep 12 22:19:48 2009 (r197144) +++ head/share/man/man5/rc.conf.5 Sat Sep 12 22:22:31 2009 (r197145) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 25, 2009 +.Dd September 2, 2009 .Dt RC.CONF 5 .Os .Sh NAME @@ -344,11 +344,6 @@ If .Xr dhclient 8 is used to set the hostname via DHCP, this variable should be set to an empty string. -.It Va ipv6_enable -.Pq Vt bool -Enable support for IPv6 networking. -Note that this requires that the kernel has been compiled with -.Cd "options INET6" . .It Va nisdomainname .Pq Vt str The NIS domain name of this host, or @@ -1251,28 +1246,45 @@ This is the IPv6 equivalent of Instead of setting the ifconfig variables as .Va ifconfig_ Ns Aq Ar interface they should be set as -.Va ipv6_ifconfig_ Ns Aq Ar interface . +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6. Aliases should be set as -.Va ipv6_ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n . +.Va ifconfig_ Ns Ao Ar interface Ac Ns Va _alias Ns Aq Ar n . .Va ipv6_prefix_ Ns Aq Ar interface does something. -Interfaces that do not have a -.Va ipv6_ifconfig_ Ns Aq Ar interface -setting will be auto configured by +Interfaces that have a +.Fl accept_rtadv +flag in +.Va ifconfig_ Ns Ao Ar interface Ac Ns _ipv6 +setting will be automatically configured by .Xr rtsol 8 if the .Va ipv6_gateway_enable is set to .Dq Li NO . -Note that the IPv6 networking code does not support the -.Pa /etc/start_if. Ns Aq Ar interface -files. .It Va ipv6_default_interface .Pq Vt str If not set to .Dq Li NO , this is the default output interface for scoped addresses. Now this works only for IPv6 link local multicast addresses. +.It Va ip6addrctl_enable +.Pq Vt bool +If set to +.Dq Li YES , +install default address selection policy table +.Pq RFC 3484 . +If a file +.Pa /etc/ip6addrctl.conf +is found the +.Xr ip6addrctl 8 +reads and installs it. +If not, a pre-defined policy table will be installed. +There are two pre-defined ones; IPv4-preferred and IPv6-preferred. +If set +.Va ipv6_prefer +variable to +.Dq Li YES +the IPv6-preferred one is used. Default is IPv4-preferred. .It Va cloned_interfaces .Pq Vt str Set to the list of clonable network interfaces to create on this host. @@ -2300,48 +2312,48 @@ between interfaces. .Pq Vt bool The IPv6 equivalent of .Va gateway_enable . -.It Va router_enable +.It Va routed_enable .Pq Vt bool If set to .Dq Li YES , run a routing daemon of some sort, based on the settings of -.Va router +.Va routed_program and -.Va router_flags . -.It Va ipv6_router_enable +.Va routed_flags . +.It Va route6d_enable .Pq Vt bool The IPv6 equivalent of -.Va router_enable . +.Va routed_enable . If set to .Dq Li YES , run a routing daemon of some sort, based on the settings of -.Va ipv6_router +.Va route6d_program and -.Va ipv6_router_flags . -.It Va router +.Va route6d_flags . +.It Va routed_program .Pq Vt str If -.Va router_enable +.Va routed_enable is set to .Dq Li YES , this is the name of the routing daemon to use. -.It Va ipv6_router +.It Va route6d_program .Pq Vt str The IPv6 equivalent of -.Va router . -.It Va router_flags +.Va routed_program . +.It Va routed_flags .Pq Vt str If -.Va router_enable +.Va routed_enable is set to .Dq Li YES , these are the flags to pass to the routing daemon. -.It Va ipv6_router_flags +.It Va route6d_flags .Pq Vt str The IPv6 equivalent of -.Va router_flags . +.Va routed_flags . .It Va mrouted_enable .Pq Vt bool If set to