Proposal ipv6_addrs_common

Stefan Esser se at freebsd.org
Mon Feb 6 11:48:15 UTC 2012


Am 06.02.2012 03:46, schrieb Hiroki Sato:
>  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
>  "

I like this, but it does not seem to be compatible with David Teske's
sysrc script. And even though that script has not been made part of
the FreeBSD sources (yet), I consider it to provide valuable service,
that should be preserved. So you should find another separator than
new-line, IMHO. [-,:/.] are already used to express addresses (IPv4 or
IPv6), so a candidate might be "|" since it does not conflict with
any ifconfig parameter.

>  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.

A general syntax for this purpose is useful, but I'd rather not see
new-lines used for this purpose. For example, I have used "sort" to
prepare rc.conf files from different hosts for easy comparison with
each other. This will be broken, if entries cover more than one line.
There may be other breakage of that kind.

So please choose a separator character that keeps lines intact ...

Regards, STefan


More information about the freebsd-rc mailing list