You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tailscale exit node breaks Happy Eyeballs on MacOS and iOS (rfc6555) #2299
When using a dual stacked exit node, tailscale breaks Happy Eyeballs (at least on the mac). A test that was used to fix iOS and MacOS's Happy Eyeballs implementation years ago is located here:
As you can see with my results from test-ipv6.com, I have IPv6 connectivity but MacOS isn't using it. It seems something you're doing with Magic DNS is causing the AAAA records to be delayed and the OS preferring IPv4.
This is very similar to #1486, in which includes this comment (#1486 (comment)):
@DentonGentry proposed a hypothesis that I like, which is that Chrome may be treating IPv6 ULAs (such as our Tailscale IPs and routes) as "less good" connectivity than native IPv6, and so is preferring IPv4 because it thinks the v6 connectivity is bad. Chrome apparently does this already with 6RD addresses, among others, so it's a plausible suggestion. I'm currently struggling to clone the Chromium source repository so that I can explore how exactly it's implementing Happy Eyeballs, to confirm or disprove.
Chrome is the worst offender, but it also happens with safari. Just in safari it will sometimes use IPv6 when using exit node, but if I turn exit node off it uses IPv6 100% of the time in safari and chrome. IMO real IPv6 space is a better idea. We did this at FB when doing internal IPv6-only vs doing ULA.
This may be more nuanced and related to address selection and ordering with DNS etc. Maybe the ULA addresses de-prioritize IPv6 in ordering for getaddrinfo. You can also show this problem with a simple net.Dial to a dual stacked host and it will connect over IPv4 almost every time.
This might be related to #5425, if macOS was being used as the exit node. Though the worst of the symptoms happen with Chrome 104 and later, the underlying problem impacted IPv6 until 1.30.1 and could easily have broken Happy Eyeballs.
Barring further comment or additional reports of the issue with 1.30.1 or later, we'll expect to close this during the next regular bug scrub.
Activity
bradfitz commentedon Jul 1, 2021
You using Chrome?
This is very similar to #1486, in which includes this comment (#1486 (comment)):
bradfitz commentedon Jul 1, 2021
(If this turns out to be the case, I suppose getting some proper IPv6 space probably isn't too hard.)
/cc @danderson
psaab commentedon Jul 1, 2021
Chrome is the worst offender, but it also happens with safari. Just in safari it will sometimes use IPv6 when using exit node, but if I turn exit node off it uses IPv6 100% of the time in safari and chrome. IMO real IPv6 space is a better idea. We did this at FB when doing internal IPv6-only vs doing ULA.
psaab commentedon Jul 1, 2021
This may be more nuanced and related to address selection and ordering with DNS etc. Maybe the ULA addresses de-prioritize IPv6 in ordering for getaddrinfo. You can also show this problem with a simple net.Dial to a dual stacked host and it will connect over IPv4 almost every time.
$ cat getaddrinfo.py
import socket
print(socket.getaddrinfo("www.facebook.com", "80"))
without exit node:
$ python3 getaddrinfo.py
[(<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('2a03:2880:f10d:83:face:b00c:0:25de', 80, 0, 0)), (<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('2a03:2880:f10d:83:face:b00c:0:25de', 80, 0, 0)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('157.240.11.35', 80)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('157.240.11.35', 80))]
with exit node:
$ python3 getaddrinfo.py
[(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('31.13.88.35', 80)), (<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('31.13.88.35', 80)), (<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_DGRAM: 2>, 17, '', ('2a03:2880:f10d:183:face:b00c:0:25de', 80, 0, 0)), (<AddressFamily.AF_INET6: 30>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('2a03:2880:f10d:183:face:b00c:0:25de', 80, 0, 0))]
bradfitz commentedon Jul 1, 2021
Is that with 100.100.100.100? (that is, using MagicDNS or otherwise have a DNS config that enables the 100.100.100.100 resolver?)
psaab commentedon Jul 1, 2021
DNS configuration (for scoped queries)
resolver #1
search domain[0] : lan
nameserver[0] : 2603:800c:2b43:d9f0:449b:adff:fe74:13da
nameserver[1] : 192.168.86.1
if_index : 6 (en0)
flags : Scoped, Request A records, Request AAAA records
reach : 0x00000002 (Reachable)
resolver #2
search domain[0] : paul-m-saab.gmail.com.beta.tailscale.net
nameserver[0] : 100.100.100.100
if_index : 22 (utun6)
flags : Scoped, Request A records, Request AAAA records
reach : 0x00000003 (Reachable,Transient Connection)
if I turn off DNS in tailscale perferences, all dns stops working.
DentonGentry commentedon Jul 21, 2021
https://www.arin.net/resources/guide/ipv6/first_request/#isp
DentonGentry commentedon Oct 30, 2022
This might be related to #5425, if macOS was being used as the exit node. Though the worst of the symptoms happen with Chrome 104 and later, the underlying problem impacted IPv6 until 1.30.1 and could easily have broken Happy Eyeballs.
Barring further comment or additional reports of the issue with 1.30.1 or later, we'll expect to close this during the next regular bug scrub.
DentonGentry commentedon Jan 7, 2023
Believed to be a symptom of #5425.
Closing as a dup of #5425