DNS name resolution should not be done during configuration parsing.
Eryk Wieliczko
eryk at wieliczko.ninja
Sun Feb 17 13:47:36 CET 2019
That fix is a hack. There simply shouldn't be ANY checking if the domain/port is correct in config.c.
If someone wants to use "nonexistentdomain.nonexistenthost.nonexistenttld:41342", WireGuard should not complain about it.
Of course, it should still check if the port number is < 65535. But leave the domain alone and check it only during connection.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, February 17, 2019 4:03 AM, David Kerr <david at kerr.net> wrote:
> Erik, see here for a proposed fix. No response from the WireGuard team yet.
>
> https://lists.zx2c4.com/pipermail/wireguard/2019-January/003842.html
>
> 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.
>
> 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.
>
> 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.
>
> 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.
>
> David
>
> On Sat, Feb 16, 2019 at 8:35 PM Eryk Wieliczko <eryk at wieliczko.ninja> wrote:
>
>> Hello everyone!
>>
>> If you use a DNS address as an endpoint and there is no internet connection, WireGuard will hang for two minutes and then exit with error.
>>
>> IMO the expected behavior should be the same as in OpenVPN:
>> WireGuard starts immediately and patiently tries to resolve the DNS until it succeeds.
>>
>> Thus, WireGuard should resolve the DNS just before connecting to the server. And just keep trying and trying without any timeouts.
>>
>> I'd like to install WireGuard on technician's computers and there is no guarantee that they will start phone tethering within 2 minutes of starting their machine. OpenVPN would pass this scenario.
>>
>> What do you think?
>> _______________________________________________
>> WireGuard mailing list
>> WireGuard at lists.zx2c4.com
>> https://lists.zx2c4.com/mailman/listinfo/wireguard
>
> --
> David Kerr Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/wireguard/attachments/20190217/e7ae2a93/attachment.html>
More information about the WireGuard
mailing list