<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I agree. Wireguard should never terminate because of DNS failure, and should continue to parse config files for links that may be able to get established in absence of DNS. Wireguard also has a significant startup delay when DNS fails, several seconds while DNS times out, which should be avoided.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">David</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 19, 2019 at 12:04 AM zrm <<a href="mailto:zrm@trustiosity.com">zrm@trustiosity.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/16/19 23:08, Jeffrey Walton wrote:<br>
> On Sat, Feb 16, 2019 at 10:35 PM David Kerr <<a href="mailto:david@kerr.net" target="_blank">david@kerr.net</a>> wrote:<br>
>><br>
>> Erik, see here for a proposed fix. No response from the WireGuard team yet.<br>
>><br>
>> <a href="https://lists.zx2c4.com/pipermail/wireguard/2019-January/003842.html" rel="noreferrer" target="_blank">https://lists.zx2c4.com/pipermail/wireguard/2019-January/003842.html</a><br>
>><br>
>> Recently I had a power outage and both my gateway and cable modem went offline. On power recovery both devices start up, but the gateway completes startup before the cable modem completes its protocol negotiations, so initially the external network (eth0) is not functional. That comes online say one minute later and all is well.<br>
>><br>
>> Except that all is not well. Wireguard failed to start up because I have Endpoint=<a URL> instead of a IP address. And because external interface is not live yet, DNS lookup fails and Wireguard does not gracefully handle it. This is really important because Wireguard may be my only way into my local network.<br>
>><br>
>> As work-around I replaced the URL with the IP address... but that is not a long term solution if the endpoint is not a static IP address.<br>
>><br>
>> Wireguard needs to handle the situation where external network may not have stabilized at the time it starts up. The above link proposed a fix.<br>
> <br>
> Forgive my ignorance... Should init just retry the service start?<br>
> Something like this (from Systemd):<br>
> <br>
> [Unit]<br>
> StartLimitInterval=360<br>
> StartLimitBurst=5<br>
> <br>
> The statements above say to retry 5 times within 360 seconds.<br>
> <br>
> Jeff<br>
<br>
The issue is that the service shouldn't terminate over failure to <br>
resolve an individual endpoint.<br>
<br>
Suppose name resolution fails because of a DNS failure rather than a <br>
network failure. If there are other endpoints configured by address that <br>
are still reachable, should we give up entirely and not even connect the <br>
ones that we can? What if one of the endpoints configured by IP address <br>
is the DNS server?<br>
<br>
Pushing this onto init would imply something like separate unit files <br>
per endpoint, which may complicate things more than simplify them.<br>
<br>
It seems like the conflict is that on the one hand, we want to resolve <br>
the name at connection time rather than configuration time, but on the <br>
other hand we don't want a DNS resolver in the kernel. How hard would it <br>
be to call out to a trivial userspace DNS client? This shouldn't be very <br>
performance sensitive, the results could be cached for the TTL which is <br>
typically hours or at least minutes.<br>
_______________________________________________<br>
WireGuard mailing list<br>
<a href="mailto:WireGuard@lists.zx2c4.com" target="_blank">WireGuard@lists.zx2c4.com</a><br>
<a href="https://lists.zx2c4.com/mailman/listinfo/wireguard" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/wireguard</a><br>
</blockquote></div></div>