[RFC] resolvconf(8) interface id
Hiroki Sato
hrs at FreeBSD.org
Thu Jun 16 05:28:58 UTC 2011
"Bjoern A. Zeeb" <bzeeb-lists at lists.zabbadoz.net> wrote
in <6FE95AC6-CCB2-45B0-8347-AB31283EE144 at lists.zabbadoz.net>:
bz> I am not entirely sure I like "slaac" or "dhcp4". I wonder if progname
bz> would be sufficient in call cases either (I could well see a "dhclient"
bz> or another "fooapp" that can handle both v4 and v6) but in that case it
bz> would probably be a matter of third order -- address family.
bz>
bz> Example:
bz>
bz> prefer v6
bz> intorder "tun* gre* gif* wlan* em*" or similar (maybe classes lik
bz> "wired" or similar. not sure how easily we could do that).
bz> progorder "dhcp* rt*"
Our openresolv currently supports $interface_order with shell pattern
matching only. What I thought was
interface_order="lo lo[0-9]* *:ppp *:slaac *:dhcpv4 [a-z]*[0-9]*:*"
or something like this. Actually the interface name in
resolvconf(8)'s command line argument does not have to be the same as
real interface names because it is used just for distinguishing the
information source. My primary purpose is to prevent multiple RDNSS
information on a single interface from overwriting /etc/resolv.conf
anyway. It can be realized by just adding some additional label.
Priority control based on ifname and/or protocol (or progname) needs
no modification to the resolvconf(8) itself if we use this "interface
name + label", and it looks flexible enough to me. What we need is a
consistent expression for that and reasonable default value of
$interface_order.
Anyway, the main point here is whether adding an additional label to
interface id is reasonable or not. AFAICC, there is no side effect
by adding the ":origin" part.
bz> Have you discussed that with $upstream vendor as well or do we consider
bz> further changes to be simple enough to merge them in?
No, I haven't discuss with the upstream yet because supporting
":origin[:unique]" part need no change on the resolvconf(8) side (I
may be missing something here, though). An experimental patch for
rtsold is [1] (note that this includes some noises) and one for
dhclient is [2]. Basically these patches are just for adding
":origin" part.
[1] http://people.allbsd.org/~hrs/FreeBSD/rtsold_aggr_20110616-3.diff
[2] http://people.allbsd.org/~hrs/FreeBSD/dhclient_resolvconf_20110616-1.diff
Note that it is possible to have multiple RDNSS sources on a single
interface in the rtsold case (i.e. multiple routers sending RAs on a
link). So "em0:slaac:[RA-source-address]" is used as the interface
id for that.
-- 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-net/attachments/20110616/24a4e3cf/attachment.pgp
More information about the freebsd-net
mailing list