Re: Updating to 7.0-beta3, dhcpv6-pd setup, duid change
Roy Marples
Sat Apr 22 14:35:55 2017
On 22/04/17 11:49, Stuart Henderson wrote:
> As far as OpenBSD goes, calling ioctl SIOCGVNETID with struct ifreq
> and checking for ifr_vnetid > 0 might be a good way. It will be set to
> the vlan tag number on a vlan interface, and also act as a stable id
> for vxlan(4) interfaces (http://man.openbsd.org/vxlan) - these do
> have a MAC address but it's typically randomly generated.
>
> Example code in getvnetid() in
> https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sbin/ifconfig/ifconfig.c?rev=HEAD&content-type=text/x-cvsweb-markup
>
> The only problem is where you have the same vnetid number on multiple
> interfaces (e.g. vlan with a certain tag number on multiple interfaces),
> but it would cope with the common cases automatically, and is no worse
> than the status quo if there are duplicates.
Initial patch for this is here:
https://dev.marples.name/D107
It seems to work well enough, but it relies on vlan interfaces being
existing and configured with a vlanid before dhcpcd starts. This is
sub-optimal and requires a bit more work yet, but the OS specific parts
should be done (sans Illumos, but I can work on that later).
Saying that, dhcpcd currently doesn't bring up vlan interfaces on NetBSD
at least that are created while dhcpcd is running as the hardware
address is not yet assigned, so it's no worse for sure.
Hopefully you can test it on OpenBSD to ensure it works there at least.
If so, you could accept the revision via the web interface or just
comment here.
Roy
Archive administrator: postmaster@marples.name