Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Lonnie Abelbeck <lists@lonnie.abelbeck.com>
To: Zack Elan <wireguard@zackelan.com>
Cc: wireguard@lists.zx2c4.com
Subject: Re: DNS resolution retries and EAI_NONAME
Date: Mon, 9 Nov 2020 19:48:12 -0600	[thread overview]
Message-ID: <F98FC70C-2830-4664-8B8F-91D410068166@lonnie.abelbeck.com> (raw)
In-Reply-To: <154faa3b-098c-45c2-ab3a-99e2cf9d6754@www.fastmail.com>



> On Nov 3, 2020, at 2:57 AM, Zack Elan <wireguard@zackelan.com> wrote:
> 
> Short version: if I set WG_ENDPOINT_RESOLUTION_RETRIES=infinity, I would like wg(8) to actually retry infinitely, rather than exiting the first time it gets what it assumes to be a permanent failure.
> 
> Long version:
> 
> When WG_ENDPOINT_RESOLUTION_RETRIES is set, wg will retry endpoint resolution failures...but it special-cases 2 or 3 error response codes [0] - EAI_NONAME, EAI_FAIL and (if defined) EAI_NODATA because it considers them "permanent" failures that are not worth retrying.
> 
> I have several Wireguard tunnels that are set to start at boot on a NixOS box I host. NixOS sets this variable to infinite for me [1]. Despite this, when I reboot that host, I consistently have the tunnels fail on startup. They're failing with a error that wg(8) considers permanent:

Hi Zack,

Our project reversed the logic to make a DNS failure to be a non-fatal 'wg' error. [2]

This trivial patch has worked well for our usage.

Lonnie

[2] https://raw.githubusercontent.com/astlinux-project/astlinux/master/package/wireguard-tools/wireguard-tools-0001-ignore-endpoint-dns-failure.patch



      reply	other threads:[~2020-11-10  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  8:57 Zack Elan
2020-11-10  1:48 ` Lonnie Abelbeck [this message]

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=F98FC70C-2830-4664-8B8F-91D410068166@lonnie.abelbeck.com \
    --to=lists@lonnie.abelbeck.com \
    --cc=wireguard@lists.zx2c4.com \
    --cc=wireguard@zackelan.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).