WireGuard Archive on lore.kernel.org
 help / color / Atom feed
From: Kalin KOZHUHAROV <me.kalin@gmail.com>
To: Nico Schottelius <nico.schottelius@ungleich.ch>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: IPv6 endpoint AND IPv4 fallback endpoint in roadwarrior scenario?
Date: Mon, 30 Sep 2019 10:44:47 +0200
Message-ID: <CAKXLc7dYaAMxhnWnTMkbW4bGo=HOOhwxeCBcdP6y3D_+d5Uffg@mail.gmail.com> (raw)
In-Reply-To: <87eezyp6f1.fsf@line.ungleich.ch>

On Mon, Sep 30, 2019 at 9:53 AM Nico Schottelius
<nico.schottelius@ungleich.ch> wrote:
> At lookup time this works already.

> The problem is, if the underlying network topology changes and you need to reconnect via IPv4,
> when you had IPv6 underlying before.
Well, "if the underlying network topology changes" it is better to
detect and update things from OS level.
A restart of the wg interface (and using A/AAAA DNS records) works, so
it just needs to be initiated from whoever is taking care of the OS
network reconfiguration.

I would say that is "outside" feature, shouldn't be implemented at wg level.

Or ... actually, if there are other use cases, a more generic
"self-restart-timer" might be helpful. Something along the lines of
persistent-keepalive, but the reverse.
Persistent-keepalive is a packet send to the remote endpoint as a
one-way throw-and-forget packet, there are many valid configurations
that use it only on one of the ways (e.g. A --> B).
Currently, keepalive packets are discarded on the receive end after
updating the stats (e.g.

/* A packet with length 0 is a keepalive packet */
if (unlikely(!skb->len)) {
  update_rx_stats(peer, message_data_len(0));
  net_dbg_ratelimited("%s: Receiving keepalive packet from peer %llu
    dev->name, peer->internal_id,
  goto packet_processed;

I would say a reverse-keepalive (not the best wording) is to try to
reconnect to the peer if it was off-line (no data or KA-packets) for
some predefined time. This can be measured in number of seconds since
last packet received (KA or data). If such a condition is met,
resetting the interface (and thus redoing DNS lookup) may result in
fixing the link disruption caused by topology change.

Again, this may be better implemented outside wireguard since the
timeout is available e.g. via `wg show <INTERFACE> latest-handshakes`

WireGuard mailing list

      reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27 18:10 Rene 'Renne' Bartsch, B.Sc. Informatics
2019-09-29 14:27 ` Ulrich Kalloch
2019-09-29 19:31   ` Henning Reich
2019-09-29 20:46     ` Rene 'Renne' Bartsch, B.Sc. Informatics
2019-09-30  7:52     ` Nico Schottelius
2019-09-30  8:44       ` Kalin KOZHUHAROV [this message]

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to='CAKXLc7dYaAMxhnWnTMkbW4bGo=HOOhwxeCBcdP6y3D_+d5Uffg@mail.gmail.com' \
    --to=me.kalin@gmail.com \
    --cc=nico.schottelius@ungleich.ch \
    --cc=wireguard@lists.zx2c4.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/ public-inbox