Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Maurice Walker <maurice@walker.earth>
To: Matthias Urlichs <matthias@urlichs.de>
Cc: "wireguard@lists.zx2c4.com" <wireguard@lists.zx2c4.com>
Subject: Re: Bug report: WireGuard iOS prioritizes IPv4 over IPv6
Date: Sun, 23 Feb 2020 16:25:26 +0000	[thread overview]
Message-ID: <AM0PR03MB435421232B923FCE2962C7B0DCEF0@AM0PR03MB4354.eurprd03.prod.outlook.com> (raw)

Hi Matthias,

Thanks for the explanation.

I did some more testing on Windows. If the peer FQDN resolves to both AAAA and
A, WireGuard seems to check for an interface with an IPv4 address (other than
link-local or loopback). If there is one, it uses IPv4, otherwise IPv6. The
issue is that it doesn't seem to check whether there actually is an IPv4 route
to the peer. So as long as there is any IPv4 address on any interface, WG
doesn't use IPv6 - even if there is no IPv4 default gateway (or other IPv4
route to the peer).
Since it already seems to perform some rudimentary IPv4 connectivity check,
a simple check of the routing table could be a stopgap fix.

> Thus the frontend needs to remember all addresses, send one to the
> driver, wait a bit, check whether a link could be established, then try
> with another peer address. Repeat until success.

Right, that would ultimately be what one would wish for. But until this is
implemented, WG should at least prefer IPv6 over IPv4.

Cheers,

Maurice

(Sorry for double posting. I mailed again after the first mail had been on
hold for moderator approval for three days. I will be more patient this time.)
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

             reply	other threads:[~2020-02-25  0:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 16:25 Maurice Walker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-02-20 21:24 Maurice Walker
2020-02-17 15:44 Maurice Walker
2020-02-23 10:41 ` Matthias Urlichs
2020-01-02  8:40 Siyuan Ren

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=AM0PR03MB435421232B923FCE2962C7B0DCEF0@AM0PR03MB4354.eurprd03.prod.outlook.com \
    --to=maurice@walker.earth \
    --cc=matthias@urlichs.de \
    --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).