Merging rc.d/network_ipv6 into rc.d/netif

Mike Makonnen mtm at FreeBSD.Org
Mon Nov 5 14:16:43 PST 2007


Hello folks,

I'd really like to get this done soon. I've been using it locally and I
think it's ready for wider testing. The patch is at:
   http://people.freebsd.org/~mtm/src-etc.ipv6.diff

I'll quickly summarize the changes, but there's a longer explanation
attached to the patch.

The main goal of this patch is to remove the special-casing of IPv6
configuration in rc.d. As we get closer and closer to transitioning to
IPv6, there is no reason that IPv6 configuration should continue to be a
special case (with regards to rc.d atleast). So, this is an attempt to
normalize IPv4 and IPv6 network interface configuration and combine them
both in rc.d/netif. Read on for a short summary of the user-visible
changes:

The following knobs no longer exist:
  network_interfaces
  ipv6_network_interfaces
They have been replaced by the NOIPV4 and NOIPV6 keywords, respectively.
Use of these knobs will trigger a warning.

The following knobs have changed meaning:
  ifconfig_<IF>
  ifconfig_DEFAULT
You should no longer put IP related ifconfig(8) commands here. Instead
they go in the respective ipvX_ prefixed knobs. Using these knobs for
passing IP related configuration to ifconfig(8) will trigger a warning.
To pass IP related configuration use instead:
  ipv4_ifconfig_<IF>
  ipv6_ifconfig_<IF>
  ipv4_ifconfig_DEFAULT
  ipv6_ifconfig_DEFAULT

New knobs:
  ipv4_enable - Same deal as ipv6_enable except it works with IPv4
  ipv4_synchronous_dhclient - see explanation in patch
  ipv6_synchronous_dhclient - see explanation in patch

Most IP related knobs will have an ipv4_ and ipv6_ version. To make the
transition easier rc.subr(8) will "automagically" DTRT for the following
knobs:
        gateway_enable     => ipv4_gateway_enable
        router_enable      => ipv4_router_enable
        router             => ipv4_router
        router_flags       => ipv4_router_flags
        defaultrouter      => ipv4_defaultrouter
        static_routes      => ipv4_static_routes
        static_routes_<IF> => ipv4_static_routes_<IF>
        route_<XXX>        => ipv4_route_<XXX>
        dhclient_program   => ipv4_dhclient_program
        dhclient_flags     => ipv4_dhclient_flags
        dhclient_flags_<IF> => ipv4_dhclient_flags_<IF>
        background_dhclient_<IF> => ipv4_background_dhclient_<IF>

Please try it and let me know what you think.

Cheers.
-- 
Mike Makonnen         | GPG-KEY: http://people.freebsd.org/~mtm/mtm.asc
mmakonnen @ gmail.com | AC7B 5672 2D11 F4D0 EBF8 5279 5359 2B82 7CD4 1F55
mtm @ FreeBSD.Org     | FreeBSD - http://www.freebsd.org


More information about the freebsd-rc mailing list