-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolv.conf
on macOS sometimes has interface suffix which breaks resolve.rb
.
#35
Comments
I suspect there are two solutions possible:
(2) feels more general. |
@trevorturk @olivierlacan what versions of Ruby are you using? |
I tested this on my Linux desktop. My valid network interface:
The results:
It looks like the interface name, at least on Linux, must be correct. |
On a Darwin based system, you can get the list of interfaces using On my system,
So it does seem to work correctly. But unlike Linux, it also works even if the interface is invalid. The question is, why is this not working in |
@ioquatix Reproduced this issue on 3.2.2. |
@olivierlacan it seems like the problem is not just with Ruby, but something to do with the OS. At the time you do it, is the interface listed in |
I'm sorry to say that since switching from AT&T to Verizon the issue hasn't happened to me again, and I can't seem to reproduce now! (I guess that's good news in a way, but I'm sorry I can't reproduce...) Here's the output from my terminal:
...but the
|
@trevorturk Looks like
Tethering from macOS to iOS connected to AT&T, whose name servers are:
For comparison's sake this is what a regular coffee shop Wi-Fi connection yields:
Interestingly the
The
Those typically do the trick with sticky DNS configs on macOS. |
Relevant Ruby issues: I added I think the issue involves Resolv's use of
In my case I'm definitely using that IPV6 branch:
Crucially, this also returns true within an Even more interestingly, if I do this manually using the documentation example in Resolv which specifically passes an IPV6
|
It looks to me like this commit introduced the bug I'm encountering, at least in conjunction with Addrinfo does not handle suffixed IPV6 IPs within an Async:
Outside of Async, everything is fine:
|
Helpful context from Mastodon thread:
|
Maybe it's the async resolver mechanism that has problems understanding the address. cc @bruno- |
Hi, I'm still catching up on this thread. |
@ioquatix I just ran into this the other day and tried to run
Resolv.getaddress
onbin/rails c
within the dev same environment as @trevorturk.I can also help with repros if needed.
I put a
binding.irb
in theresolv.rb
exception site and got this:I have a feeling something about this
%en0
(network interface?!) in the ipv6 DNS hostname is not happy. Removing it works fine.Edit: I can also confirm that this
%en0
seemingly gets added when I'm tethering to an AT&T device from macOS since it is listed as such inresolv.conf
:But this isn't shown in the macOS networking settings if you look at DNS servers:
AFAIK
en0
in macOS parlance is an identifier forWi-Fi network interface
as this shows:It seems like
Resolv
is choking on this identifier when it likely should be entirely ignored. Might have to file a Ruby bug report for this.Originally posted by @olivierlacan in socketry/async-http#107 (comment)
The text was updated successfully, but these errors were encountered: