wireguard.lists.zx2c4.com archive mirror
 help / color / mirror / Atom feed
From: "Ronan Pigott" <rpigott314@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Ronan Pigott <rpigott@berkeley.edu>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [PATCH] wg-quick: linux: Don't fail systemd service when using systemd-resolved
Date: Tue, 27 Aug 2019 18:21:47 -0700	[thread overview]
Message-ID: <BWKVAQQ0RFKJ.2FBG8FY1MXOR1@rxps> (raw)
In-Reply-To: <CAHmME9pNVSr4vqXEvpH-K2bK-9OyOurkHrzK7kg0Mmyb0ASrUA@mail.gmail.com>

On Tue Aug 27, 2019 at 4:51 PM Jason A. Donenfeld wrote:
> Could you resubmit a v2 with your Signed-off-by line?
OK.

> Instead of this hack, why not just reorder unset_dns and del_if? Are
> you worried about a race in between them if they're ordered as such?
Yeah that was my first thought, then I supposed that perhaps it was
ordered that way intentionally to prevent a situation where the dns is
unset and a client would make a dns lookup on the interface before it is
deleted. It would use the sd-resolved 'global' configured dns servers in
that case which is maybe undesired.

I realize it's a hack. I gave the explanation somewhat in the hope
someone had a better solution to the problem I was experiencing.

The real issue here is that there are there are three common
implementations of resolvconf: debian resolvconf, openresolv, and
sd-resolved compat interface. So wg-quick uses resolvconf, but is only
fully compatible with openresolv. wg-quick is (accidentally) compatible
with sd-resolved through the resolvconf compat interface, except for
this minor hiccup. This hack allows wg-quick to work for both methods
with no extra configuration from the user, no alternative code path
for sd-resolved, and no change in behavior for non sd-resolved users.

There is another way that is might be more palatable: openresolv and
sd-resolved resolvconf both support a '-f' flag for ignoring missing
interfaces, which neatly sidesteps this error. However, I don't think
debian's resolvconf supports this flag. Now that I look into it though,
it seems debian's resolvconf does not support '-l' either, which wg-quick
uses, so maybe we don't care to support this anyway. I think v2 will
just use the flag instead, if that's alright.

Users of openvpn use sd-resolved dbus interface in place of resolvconf,
such as seen here: https://github.com/jonathanio/update-systemd-resolved
but I believe this is overkill for wg-quick.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

  reply	other threads:[~2019-08-28  2:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-24  7:14 [PATCH] wg-quick: linux: Don't fail systemd service when using systemd-resolved Ronan Pigott
2019-08-27 22:51 ` Jason A. Donenfeld
2019-08-28  1:21   ` Ronan Pigott [this message]
2019-08-28  2:20     ` Jason A. Donenfeld

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=BWKVAQQ0RFKJ.2FBG8FY1MXOR1@rxps \
    --to=rpigott314@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=rpigott@berkeley.edu \
    --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).