Issue #12112 has been reported by Daniel Helgenberger.

----------------------------------------
Bug #12112: Resolv.getname with IPv6 noop
https://bugs.ruby-lang.org/issues/12112

* Author: Daniel Helgenberger
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: 1.9.3 - 2.2.1
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
Currently reverse resolving IPv6 addresses using stdlib Resolv does not work.

### How reproducible
always

### Steps:
1. Require 'resolv'
2. Use #getname or #getnames with a valid, reverse resolvable IPv6 address

### Result:
resolv error with #getname, empty result using #getnames

### Expected result:
Resolved to hostname as with IPv4

### Example, system:

~~~
dig @8.8.8.8 +short -x 2a00:1450:4001:803::1018                                                                           
fra07s30-in-x18.1e100.net.
~~~

### ruby:

~~~
[1] pry(main)> require 'resolv'
=> false
[2] pry(main)> resolver = Resolv::DNS.new(:nameserver => '8.8.8.8')
#[...]
[3] pry(main)> resolver.getname('2a00:1450:4001:803::1018')
Resolv::ResolvError: no name for 2a00:1450:4001:803::1018
from ~/.rvm/rubies/ruby-2.0.0-p643/lib/ruby/2.0.0/resolv.rb:128:in `getname'
[4] pry(main)> resolver.getnames('2a00:1450:4001:803::1018')
=> []
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>