Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Eryk Wieliczko <eryk@wieliczko.ninja>
To: David Kerr <david@kerr.net>
Cc: "wireguard@lists.zx2c4.com" <wireguard@lists.zx2c4.com>
Subject: Re: DNS name resolution should not be done during configuration parsing.
Date: Sun, 17 Feb 2019 12:47:36 +0000	[thread overview]
Message-ID: <e9LcGQI1EZfQ2-VENJX6PnLGuxlapIvUHMP4v7HW5f_L1oDnH7MsGnfLxTk1K6tACrwA0GHhbsHKqHHqFIFt1bPRFAElCXcaI6KXlR8alDQ=@wieliczko.ninja> (raw)
In-Reply-To: <CAJJxGdG2G+busk12y==dZOL2__+C1T6nQy+tGRJM=M65-SuZ5Q@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2565 bytes --]

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@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@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@lists.zx2c4.com
>> https://lists.zx2c4.com/mailman/listinfo/wireguard
>
> --
> David Kerr Sent from Gmail Mobile

[-- Attachment #1.2: Type: text/html, Size: 4356 bytes --]

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  parent reply	other threads:[~2019-02-18 23:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 22:28 Eryk Wieliczko
2019-02-17  3:03 ` David Kerr
2019-02-17  4:08   ` Jeffrey Walton
2019-02-17 12:40     ` Eryk Wieliczko
2019-02-17 13:07       ` Jeffrey Walton
2019-02-17 13:15         ` Eryk Wieliczko
2019-02-19  3:01     ` zrm
2019-02-19  7:22       ` Matthias Urlichs
2019-02-19 14:26         ` Lonnie Abelbeck
2019-02-19 15:45         ` Vincent Wiemann
2019-02-21  7:59           ` Matthias Urlichs
2019-02-22  1:29             ` Vincent Wiemann
2019-02-19 14:58       ` David Kerr
2019-02-17 12:47   ` Eryk Wieliczko [this message]
2019-02-17 18:26   ` Vincent Wiemann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e9LcGQI1EZfQ2-VENJX6PnLGuxlapIvUHMP4v7HW5f_L1oDnH7MsGnfLxTk1K6tACrwA0GHhbsHKqHHqFIFt1bPRFAElCXcaI6KXlR8alDQ=@wieliczko.ninja' \
    --to=eryk@wieliczko.ninja \
    --cc=david@kerr.net \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).