On 2021/07/21 07:24, jungle Boogie wrote: > On Tue, 20 Jul 2021 at 13:00, Theo de Raadt <dera...@openbsd.org> wrote: > > > > The following diff will help the most common cases. netstart will pause > > a little bit until at least one (v4 or v6) default route is installed. > > In the most common cases, this is immediate. In the dynamic cases, the > > delay is probably enough. We don't need to solve all potential problems.. > > > > > > In my test, on one machine, this did not pause long enough to bring up > the hostname.wg0 interface. > > I see this in dmesg: > pf enabled > starting network > ifconfig: no address associated with name > > running: > kern.version=OpenBSD 6.9-current (GENERIC.MP) #138: Wed Jul 21 00:57:06 MDT > 2021 > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Maybe the patch above fixes other problems for other people's machines.
This diff pauses at the end of netstart, after hostname.* are all configured. It won't help when you want to resolve a name from one of the hostname.* files (e.g. in your case I guess it's wgendpoint <hostname>). If you can use an IP address instead, that's simplest. If the name is unavoidable (for example if the other side of the wg tunnel uses dynamic dns), I'd suggest configuring wg from rc.local instead. The use case the diff helps is where you need working network when another daemon is started. (the order of netstart vs dhcpleased needs changing in /etc/rc too, otherwise it will always timeout on a v4-only network, because dhcpleased doesn't run until later).