Re: Updating to 7.0-beta3, dhcpv6-pd setup, duid change
Stuart Henderson
Sat Apr 22 19:54:49 2017
On 2017/04/22 15:36, Roy Marples wrote:
> 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
>
The code works on OpenBSD, but trying it with my setup shows a
problem. The pppoe interface doesn't have a hwaddr so unless I hardcode
IAID for that dhcpcd falls back to using the ifindex, which then conflicts
with a vlan's vnetid.
Would forcing the first byte of IAID to 0xff or something be sane for
this case?
Archive administrator: postmaster@marples.name