Proposal ipv6_addrs_common

Hiroki Sato hrs at FreeBSD.org
Mon Feb 6 02:47:22 UTC 2012


Dirk Engling <erdgeist at erdgeist.org> wrote
  in <4F2F3459.3090401 at erdgeist.org>:

er> > I also looked into an ipv6 counterpart of the ipv4_addrs_common,
er> > and your patch looks good, but I am a bit concerned about adding
er> > another independent knob to configure IPv6 addresses to rc.conf.  I
er> > feel this range specification can be integrated into
er> > ifconfig_IF_aliasN and it will be simpler than adding another knob.
er> > What do you think about it?
er>
er> Personally I do not like the fragile way of enumerating variables with
er> the aliasN functions at all. It clutters the rc.conf with gazillion
er> lines of config code, you always have to renumber the whole list when
er> adding or removing one. It also broke and locked me out of my system
er> in the past when I was just commenting out one IP address up in the
er> address list, other users of systems with a lot of jails - and thus a
er> lot of IP addresses - reported the same.
er>
er> The ipv4_addrs_common patch was a relief back then. But now v6
er> addresses start becoming common, so my configs fill up again.
er>
er> Since ipv6_addrs_common and ipv4_addrs_common share some code,
er> especially handling v6 mapped v4 addresses, I could imagine just
er> having one variable providing both v6 and v4 addresses and have an
er> ip_addrs_common figure out which are which.
er>
er> There's other code in the rc system that uses the same enumeration
er> scheme - the jail script and its _exec_afterstartN variables. My plans
er> for the near future are proposing a new way of managing your jails,
er> avoiding these error prone constructions.

 Yes, I agree that aliasN is fragile and renumbering is annoying.  I
 am using a patch to allow the following syntax for a while:

 ifconfig_tap0_aliases="
        inet6 2001:db8:8888:2::1/64
        inet6 2001:db8:9990-9999:3::1/64
        inet 10.8.1.1/24
        inet 10.8.0.1-10/24
 "

 and about to send this as a proposal.  This integrates ifalias_up(),
 ipv4_addrs_common(), and ipv6_prefix_hostid_addr_common() into one
 variable.  The existing code for them are reused actually and
 introducing this does not break backward compatibility.  In my patch
 IPv6-mapped IPv4 address is not supported, but your patch can be
 merged easily.

 One thing in my mind is whether allowing a variable which contains
 multiple lines is reasonable or not.  Is the above idea acceptable
 for us?  Other rc.conf variables involving enumeration can be
 converted in the same way, I think.

-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20120206/e6551b76/attachment.pgp


More information about the freebsd-rc mailing list