From owner-freebsd-rc@FreeBSD.ORG Thu Mar 29 18:27:15 2007 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 177AF16A408 for ; Thu, 29 Mar 2007 18:27:15 +0000 (UTC) (envelope-from mtm@FreeBSD.Org) Received: from mx1.ethionet.et (mx1.ethionet.et [213.55.64.53]) by mx1.freebsd.org (Postfix) with ESMTP id 7BADF13C45B for ; Thu, 29 Mar 2007 18:27:14 +0000 (UTC) (envelope-from mtm@FreeBSD.Org) Received: from mx1.ethionet.et (localhost [127.0.0.1]) by localhost.ethionet.et (Postfix) with ESMTP id 14B895000; Thu, 29 Mar 2007 21:23:32 +0300 (EAT) Received: from rogue.navcom.lan (unknown [213.55.64.98])by mx1.ethionet.et ( Postfix) with SMTP id C78454FE2;Thu, 29 Mar 2007 21:23:31 +0300 (EAT) Received: by rogue.navcom.lan (Postfix, from userid 1001)id 81D9A17024; Thu, 29 Mar 2007 21:29:06 +0300 (EAT) Date: Thu, 29 Mar 2007 21:29:06 +0300 From: Mike Makonnen To: freebsd-rc@freebsd.org Message-ID: <20070329182906.GB38703@rogue.navcom.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i X-Operating-System: FreeBSD/7.0-CURRENT (i386) X-imss-version: 2.46 X-imss-result: Passed X-imss-scores: Clean:99.90000 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:4 C:3 M:3 S:4 R:3 (1.0000 1.0000) Cc: freebsd-net@freebsd.org Subject: Merging rc.d/network_ipv6 into rc.d/netif X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Mar 2007 18:27:15 -0000 Hello folks, Ever since rc.d was brought into the tree we all agreed IPv6 needed to be integrated better. Well, I've finally gotten arround to it... several years later :-P The patch is at: http://people.freebsd.org/~mtm/src-etc.ipv6.diff What it does ------------ - rc.d/network_ipv6 is no longer necessary and can be removed - IPv6 configuration is done on each interface in rc.d/netif along with IPv4 - IPv6 routing and options processing is done in rc.d/routing along with IPv4 - You can now do things like: # Start/Stop IPv6 on all interfaces /etc/rc.d/netif (start|stop) ip6 # Start/Stop IPv6 only on interface rl0 /etc/rc.d/netif (start|stop) rl0 ip6 # Do IPv6 options processing /etc/rc.d/routing options ip6 Overview of the changes in src/etc ----------------------------------- - In order to differentiate between v4 and v6 configuration directives some knobs in rc.conf(5)have been renamed with an ipv4_ prefix: network_interfaces ifconfig_DEFAULT ifconfig_ ifconfig__aliasX defaultrouter gateway_enable static_routes etc... - Modify all scripts that reference old knobs (without ipv4_ prefix) to reference the new version of the knobs - Compatibility shims in rc.subr(8) so that old uses of knobs without an ipv4_ prefix work as expected. As part of this change split the code for this processing into its own function: old2new_knobs() - Modify some routines in etc/network.subr to take an additional argument to specify v4 or v6 configuration: _ifconfig_get_args ifconfig_getargs autoif wpaif - Move some invocations of route(8) and v6 options processing into rc.d/routing I'm using the patches on my main work machine without any problems, so I think it's ready for a wider review. Please try it out and send me any comments, bug-reports, etc. I would especially like feedback from folks more familiar with IPv6. One gotcha I've noticed is that if you boot with ipv6_enable turned off, then try to start IPv6 on an interface later on, it doesn't work because none of the interfaces (except lo0) has a link-local address (see rc.d/auto_linklocal). How can we fix this? Also, I would appreciate feedback on how stopping IPv6 on an interface should be handled. In rc.d/network_ipv6 it was handled at all. Currently, it goes through and deletes all IPv6 addresses on the interface. Cheers. -- Mike Makonnen | GPG-KEY: http://www.identd.net/~mtm/mtm.asc mmakonnen@gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55 mtm@FreeBSD.Org | FreeBSD - Unleash the Daemon !