Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Mar 2007 21:29:06 +0300
From:      Mike Makonnen <mtm@FreeBSD.Org>
To:        freebsd-rc@freebsd.org
Cc:        freebsd-net@freebsd.org
Subject:   Merging rc.d/network_ipv6 into rc.d/netif
Message-ID:  <20070329182906.GB38703@rogue.navcom.lan>

next in thread | raw e-mail | index | archive | help
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_<interface>
	ifconfig_<interface>_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 !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070329182906.GB38703>