Skip to content

dnsruby cannot interpret an IPv6 link-local address with interface specifier #184

Description

@Supermathie

This is affecting one of our MacOS users who is using ruby 2.7.5 and dnsruby 1.61.5.

(separate bug, but interacts with #179 to cause an infinite loop for him)

His resolv.conf is:

nameserver fe80::feed:face:c0ff:ee00%en0
nameserver 192.168.0.1

which is valid since that's an interface-specific LLA, but Dnsruby::Resolver.new.query(…) hangs indefinitely, probably because of #179

I can replicate this with:

pry> Dnsruby::Resolver.new('fe80::feed:face:c0ff:ee00%en0')
ArgumentError: Can't make sense of nameserver : , exception : Nameserver invalid!
from /home/michael/.rvm/gems/ruby-2.6.6/gems/dnsruby-1.61.5/lib/dnsruby/config.rb:306:in `rescue in rescue in rescue in resolve_server'
Caused by Dnsruby::ResolvError: Nameserver invalid!
from /home/michael/.rvm/gems/ruby-2.6.6/gems/dnsruby-1.61.5/lib/dnsruby/recursor.rb:444:in `get_closest_known_zone_for'
Caused by ArgumentError: cannot interpret as IPv6 address: nil
from /home/michael/.rvm/gems/ruby-2.6.6/gems/dnsruby-1.61.5/lib/dnsruby/ipv6.rb:97:in `create'
Caused by ArgumentError: cannot interpret as IPv4 address: nil
from /home/michael/.rvm/gems/ruby-2.6.6/gems/dnsruby-1.61.5/lib/dnsruby/ipv4.rb:35:in `create'

though it returns after ~5s in my case, not creating an infinite loop.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions