WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* Request to change IPv4 preference - mobile apps
@ 2019-04-14 17:17 Will Tisdale
  2019-05-06 20:57 ` Nico Schottelius
  0 siblings, 1 reply; 4+ messages in thread
From: Will Tisdale @ 2019-04-14 17:17 UTC (permalink / raw)
  To: wireguard

Hello,

I sent a message to the list about weirdness with IPv4 being preferred
over IPv6 in the iOS app a few days ago, but it didn't get there for
whatever reason.

I've since done a bit of digging through the code and found that
preferring IPv4 is intentional, and it's also implemented that way on
the Android app too.

It seems a shame to hobble native IPv6 support for everyone just to
work around some peoples misconfigured setups.

My suggestion/request would be to change the apps to prefer IPv6 as
default, but add a switch to the apps to disable IPv6 or prefer IPv4
for those with broken setups.

Does that seem reasonable?


Cheers,


-Will
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Request to change IPv4 preference - mobile apps
  2019-04-14 17:17 Request to change IPv4 preference - mobile apps Will Tisdale
@ 2019-05-06 20:57 ` Nico Schottelius
  2019-05-07 16:28   ` Will Tisdale
  0 siblings, 1 reply; 4+ messages in thread
From: Nico Schottelius @ 2019-05-06 20:57 UTC (permalink / raw)
  To: Will Tisdale; +Cc: wireguard


Hey Will,

I think the "proper" way to handle this is by using the happy eyeballs
algorithm: resolve AAAA and A, connect to both, use whatever answers
first.

Best,

Nico

Will Tisdale <will@z3n.uk> writes:

> Hello,
>
> I sent a message to the list about weirdness with IPv4 being preferred
> over IPv6 in the iOS app a few days ago, but it didn't get there for
> whatever reason.
>
> I've since done a bit of digging through the code and found that
> preferring IPv4 is intentional, and it's also implemented that way on
> the Android app too.
>
> It seems a shame to hobble native IPv6 support for everyone just to
> work around some peoples misconfigured setups.
>
> My suggestion/request would be to change the apps to prefer IPv6 as
> default, but add a switch to the apps to disable IPv6 or prefer IPv4
> for those with broken setups.
>
> Does that seem reasonable?
>
>
> Cheers,
>
>
> -Will
> _______________________________________________
> WireGuard mailing list
> WireGuard@lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/wireguard


--
Your Swiss, Open Source and IPv6 Virtual Machine. Now on www.datacenterlight.ch.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Request to change IPv4 preference - mobile apps
  2019-05-06 20:57 ` Nico Schottelius
@ 2019-05-07 16:28   ` Will Tisdale
  2019-05-08  9:18     ` Nico Schottelius
  0 siblings, 1 reply; 4+ messages in thread
From: Will Tisdale @ 2019-05-07 16:28 UTC (permalink / raw)
  To: Nico Schottelius; +Cc: wireguard

[-- Attachment #1.1: Type: text/plain, Size: 1978 bytes --]

Hi Nico,

Not sure how that would work with WireGuard being a stateless protocol.
It also sounds a bit racey given that both v4 and v6 addresses would be
flinging packets at essentially the same endpoint.

I think the ‘proper’ way is to use the address returned in the AAAA record
if one exists. If people’s setup is so broken that it becomes an issue,
they
will likely have worse issues than WG not working. :)

Preferring v4 does weird things like WG using DNS64 addresses over real
v6 addresses too - and using NAT64 instead of native v6 is really broken
behaviour.


Cheers,


-Will

On Mon, 6 May 2019 at 21:57, Nico Schottelius <nico.schottelius@ungleich.ch>
wrote:

>
> Hey Will,
>
> I think the "proper" way to handle this is by using the happy eyeballs
> algorithm: resolve AAAA and A, connect to both, use whatever answers
> first.
>
> Best,
>
> Nico
>
> Will Tisdale <will@z3n.uk> writes:
>
> > Hello,
> >
> > I sent a message to the list about weirdness with IPv4 being preferred
> > over IPv6 in the iOS app a few days ago, but it didn't get there for
> > whatever reason.
> >
> > I've since done a bit of digging through the code and found that
> > preferring IPv4 is intentional, and it's also implemented that way on
> > the Android app too.
> >
> > It seems a shame to hobble native IPv6 support for everyone just to
> > work around some peoples misconfigured setups.
> >
> > My suggestion/request would be to change the apps to prefer IPv6 as
> > default, but add a switch to the apps to disable IPv6 or prefer IPv4
> > for those with broken setups.
> >
> > Does that seem reasonable?
> >
> >
> > Cheers,
> >
> >
> > -Will
> > _______________________________________________
> > WireGuard mailing list
> > WireGuard@lists.zx2c4.com
> > https://lists.zx2c4.com/mailman/listinfo/wireguard
>
>
> --
> Your Swiss, Open Source and IPv6 Virtual Machine. Now on
> www.datacenterlight.ch.
>

[-- Attachment #1.2: Type: text/html, Size: 3155 bytes --]

<div><div dir="auto">Hi Nico,</div></div><div dir="auto"><br></div><div dir="auto">Not sure how that would work with WireGuard being a stateless protocol.</div><div dir="auto">It also sounds a bit racey given that both v4 and v6 addresses would be </div><div dir="auto">flinging packets at essentially the same endpoint. </div><div dir="auto"><br></div><div dir="auto">I think the ‘proper’ way is to use the address returned in the AAAA record</div><div dir="auto">if one exists. If people’s setup is so broken that it becomes an issue, they </div><div dir="auto">will likely have worse issues than WG not working. :)</div><div dir="auto"><br></div><div dir="auto">Preferring v4 does weird things like WG using DNS64 addresses over real </div><div dir="auto">v6 addresses too - and using NAT64 instead of native v6 is really broken </div><div dir="auto">behaviour. </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">Cheers,</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">-Will</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 6 May 2019 at 21:57, Nico Schottelius &lt;<a href="mailto:nico.schottelius@ungleich.ch">nico.schottelius@ungleich.ch</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hey Will,<br>
<br>
I think the &quot;proper&quot; way to handle this is by using the happy eyeballs<br>
algorithm: resolve AAAA and A, connect to both, use whatever answers<br>
first.<br>
<br>
Best,<br>
<br>
Nico<br>
<br>
Will Tisdale &lt;<a href="mailto:will@z3n.uk" target="_blank">will@z3n.uk</a>&gt; writes:<br>
<br>
&gt; Hello,<br>
&gt;<br>
&gt; I sent a message to the list about weirdness with IPv4 being preferred<br>
&gt; over IPv6 in the iOS app a few days ago, but it didn&#39;t get there for<br>
&gt; whatever reason.<br>
&gt;<br>
&gt; I&#39;ve since done a bit of digging through the code and found that<br>
&gt; preferring IPv4 is intentional, and it&#39;s also implemented that way on<br>
&gt; the Android app too.<br>
&gt;<br>
&gt; It seems a shame to hobble native IPv6 support for everyone just to<br>
&gt; work around some peoples misconfigured setups.<br>
&gt;<br>
&gt; My suggestion/request would be to change the apps to prefer IPv6 as<br>
&gt; default, but add a switch to the apps to disable IPv6 or prefer IPv4<br>
&gt; for those with broken setups.<br>
&gt;<br>
&gt; Does that seem reasonable?<br>
&gt;<br>
&gt;<br>
&gt; Cheers,<br>
&gt;<br>
&gt;<br>
&gt; -Will<br>
&gt; _______________________________________________<br>
&gt; WireGuard mailing list<br>
&gt; <a href="mailto:WireGuard@lists.zx2c4.com" target="_blank">WireGuard@lists.zx2c4.com</a><br>
&gt; <a href="https://lists.zx2c4.com/mailman/listinfo/wireguard" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/wireguard</a><br>
<br>
<br>
--<br>
Your Swiss, Open Source and IPv6 Virtual Machine. Now on <a href="http://www.datacenterlight.ch" rel="noreferrer" target="_blank">www.datacenterlight.ch</a>.<br>
</blockquote></div></div>

[-- Attachment #2: Type: text/plain, Size: 148 bytes --]

_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Request to change IPv4 preference - mobile apps
  2019-05-07 16:28   ` Will Tisdale
@ 2019-05-08  9:18     ` Nico Schottelius
  0 siblings, 0 replies; 4+ messages in thread
From: Nico Schottelius @ 2019-05-08  9:18 UTC (permalink / raw)
  To: Will Tisdale; +Cc: wireguard


Hey Will,

even though I do prefer IPv6, the approach that you describe has been
shown to be rather error prone and is one of the reasons, why people
turn off IPv6 at the moment.

So in my opinion, using happy eyeballs would be the proper way of
handling the matter, as it gives users the best experience and has
proven to be working for browsers.

In terms of "flinging packets": there is at maximum 2 packets in this
state, as can be seen in the following diagram:


client -----> [v6] -----> server
       -----> [v4] ----->

client <----- [v6] <----- server
       <----- [v4] <-----

Τhen the client continues to use either of both protocols, let's say
ipv6 was faster in answering:

client -----> [v6] -----> server
client <----- [v6] <----- server
...

I don't think this any realistic problem, we are talking about a few
bytes per session / reconnect, not a generic overhead.

Best,

Nico


Will Tisdale <will@z3n.uk> writes:

> Hi Nico,
>
> Not sure how that would work with WireGuard being a stateless protocol.
> It also sounds a bit racey given that both v4 and v6 addresses would be
> flinging packets at essentially the same endpoint.
>
> I think the ‘proper’ way is to use the address returned in the AAAA record
> if one exists. If people’s setup is so broken that it becomes an issue,
> they
> will likely have worse issues than WG not working. :)
>
> Preferring v4 does weird things like WG using DNS64 addresses over real
> v6 addresses too - and using NAT64 instead of native v6 is really broken
> behaviour.
>
>
> Cheers,
>
>
> -Will
>
> On Mon, 6 May 2019 at 21:57, Nico Schottelius <nico.schottelius@ungleich.ch>
> wrote:
>
>>
>> Hey Will,
>>
>> I think the "proper" way to handle this is by using the happy eyeballs
>> algorithm: resolve AAAA and A, connect to both, use whatever answers
>> first.
>>
>> Best,
>>
>> Nico
>>
>> Will Tisdale <will@z3n.uk> writes:
>>
>> > Hello,
>> >
>> > I sent a message to the list about weirdness with IPv4 being preferred
>> > over IPv6 in the iOS app a few days ago, but it didn't get there for
>> > whatever reason.
>> >
>> > I've since done a bit of digging through the code and found that
>> > preferring IPv4 is intentional, and it's also implemented that way on
>> > the Android app too.
>> >
>> > It seems a shame to hobble native IPv6 support for everyone just to
>> > work around some peoples misconfigured setups.
>> >
>> > My suggestion/request would be to change the apps to prefer IPv6 as
>> > default, but add a switch to the apps to disable IPv6 or prefer IPv4
>> > for those with broken setups.
>> >
>> > Does that seem reasonable?
>> >
>> >
>> > Cheers,
>> >
>> >
>> > -Will
>> > _______________________________________________
>> > WireGuard mailing list
>> > WireGuard@lists.zx2c4.com
>> > https://lists.zx2c4.com/mailman/listinfo/wireguard
>>
>>
>> --
>> Your Swiss, Open Source and IPv6 Virtual Machine. Now on
>> www.datacenterlight.ch.
>>


--
Your Swiss, Open Source and IPv6 Virtual Machine. Now on www.datacenterlight.ch.
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-14 17:17 Request to change IPv4 preference - mobile apps Will Tisdale
2019-05-06 20:57 ` Nico Schottelius
2019-05-07 16:28   ` Will Tisdale
2019-05-08  9:18     ` Nico Schottelius

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


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


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