Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Kalin KOZHUHAROV <me.kalin@gmail.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
	"WireGuard mailing list" <wireguard@lists.zx2c4.com>
Subject: Re: Roaming between IPv4 and IPv6?
Date: Wed, 7 Mar 2018 01:31:05 +0100	[thread overview]
Message-ID: <CAKXLc7diB1tx9oHJ9JRio84wrrbEqPu7nLi7WAY83h9nqT0g4w@mail.gmail.com> (raw)
In-Reply-To: <CAHmME9ogYdW3AUUC6qQRkmq2ndEqk0MHxt0sVF=BKvdNQKZO3A@mail.gmail.com>

On Tue, Mar 6, 2018 at 11:14 PM, Jason A. Donenfeld <Jason@zx2c4.com> wrote=
:
> On Tue, Mar 6, 2018 at 11:08 PM, Toke H=C3=B8iland-J=C3=B8rgensen <toke@t=
oke.dk> wrote:
>> I think the idea of configuring both v4 and v6 on startup and caching
>> them is a reasonable idea. Maybe even configure all available addresses
>> when doing the initial DNS lookup? Or is that awkward to do?
>
> You mean taking one v4 and one v6? That's probably possible. Since
> getaddrinfo has complicated ordering logic, this probably be best
> expressed as something like "endpoint" and "secondary endpoint" when
> told by userspace, with them then being swapped when the FIB complains
> about trying to route to one of them.
>
A slight simplification/generalization will be to define a peer in
terms of and ordered C-list of IP addresses (whether v4 or v6), 0 or
more (currently 0 or 1 IP+port).
Then sending will try the first and move to the next, possibly adding
a "bad score", until one of the endpoint is reachable; then keep using
it until it fails again.
Those IP addresses may come from say A records of a certain host (this
is not WG land anyway), slapping a default port at the back.
Add a fat warning that the more unreachable IP addresses you add, the
more delays will be introduced.
(of course, to make things simple, a peer is defined as knowing the
secret key; changing IPs, and ports and allowed_ips does not matter)

Another GSoC idea, LoL.

Cheers,
Kalin.

  reply	other threads:[~2018-03-07  0:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 21:53 Toke Høiland-Jørgensen
2018-03-06 21:57 ` Jason A. Donenfeld
2018-03-06 22:08   ` Toke Høiland-Jørgensen
2018-03-06 22:14     ` Jason A. Donenfeld
2018-03-07  0:31       ` Kalin KOZHUHAROV [this message]
2018-03-07  8:56         ` Toke Høiland-Jørgensen
2018-03-06 22:59     ` Matthias Urlichs

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=CAKXLc7diB1tx9oHJ9JRio84wrrbEqPu7nLi7WAY83h9nqT0g4w@mail.gmail.com \
    --to=me.kalin@gmail.com \
    --cc=Jason@zx2c4.com \
    --cc=toke@toke.dk \
    --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).