On Tue, Jul 20, 2021 at 08:53:03AM -0000, Stuart Henderson wrote:
> On 2021-07-19, jungle Boogie <jungleboog...@gmail.com> wrote:
> > On Mon, 19 Jul 2021 at 04:48, Christian Weisgerber <na...@mips.inka.de> 
> > wrote:
> >>
> >> Look guys, it's simple.
> >>
> >> If you want IPv6 (SLAAC) autoconfiguration, you set "inet6 autoconf"
> >> for that interface.  slaacd(8) will then automatically handle things.
> >>
> >> If you want IPv4 (DHCP) autoconfiguration, you set "inet autoconf"
> >> for that interface.  dhcpleased(8) will then automatically handle
> >> things.  If you require special DHCP options that dhcpleased(8)
> >> doesn't include, then you don't enable autoconfigurarion and run
> >> dhclient(8) instead, which can be extensively configured.
> >>
> >> Both slaacd(8) and dhcpleased(8) pass nameserver information to
> >> resolvd(8), which adds those nameservers to /etc/resolv.conf unless
> >> unwind(8) is running.  If you don't want that to happen for some
> >> other reason, you turn off resolvd(8).
> >>
> >
> > Sounds like great information to put in current.html:
> > https://www.openbsd.org/faq/current.html
> > I think folks are surprised by the change and want to know how to
> > handle the new daemons in certain situations.
> > Your explanation above is very helpful and probably could be used in
> > current.html
> > I imagine the 7.0 "what's new" section will contain something similar.
> >
> >
> > What do I need to do to have WireGuard start at boot when I want to
> > use a hostname in my hostname.wg0 interface file?
> >
> > Currently, the interface doesn't come up as expected:
> > ifconfig: no address associated with name
> >
> > Are these my options?
> > a. use dhclient
> > b. make a script to start the interface later
> > c. use ip address
> 
> or d. add an entry to /etc/hosts
> 
> Some people are also running into problems with hostnames in pf.conf;
> a c and d apply in that case too.
> 
> Some of this could be fixed by having a way to ask dhcpleased to wait
> (with timeout) for an address during boot. For your example with wg,
> as well as that, netstart would need to be split i.e. start standard
> interfaces, then dhcpleased/unwind/resolvd, then tunnel interfaces.
> 
> I was going to say the same would apply for hostnames used in fstab
> if /usr and /var are NFS-mounted; but actually /usr and /var can't
> be NFS-mounted if you rely on addresses from dhcpleased to reach the
> NFS server anyway (these daemons need access to /var so they need
> to be started after /usr and /var are mounted).
> 

Actually this needs to be fixed in /etc/netstart, dhcpleasd / slaacd. Until
now systems with dynamic ips had the 10sec wait of dhclient to make sure
the interfaces are up and configured. This no longer and because of this
stuff breaks left and right.

Up until now the system relied on the fact that after /etc/netstart ran
the interfaces where up and configured (static or dynamic) and all
following services relied on this fact. Honestly adding host entires is
not a solution because it will not work in all cases. e.g. pf rules using
interface names as addresses will not work correctly.

There must be a way to wait at the end of netstart to ensure that network
configuration settled or timed out. IIRC dlg@ hat a diff that allowed
something along these lines.

We already hit this issue with slaacd on IPv6-only setups and ignored it.
Now it affects everyone, lets not ignore it again.
-- 
:wq Claudio

Reply via email to