[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-core
Subject: [ruby-core:74010] [Ruby trunk Bug#12112] Resolv.getname with IPv6 noop
From: witlessbird+ruby () gmail ! com
Date: 2016-02-26 14:09:09
Message-ID: redmine.journal-57163.20160226140909.67e64bca1d6e59b1 () ruby-lang ! org
[Download RAW message or body]
Issue #12112 has been updated by Dmitri Dolguikh.
File 12112_fixes_ipv6_ptr_resolver.patch added
I'm seeing this issue on 2.0.0, 2.2.1, 2.2.2, but not 1.9.3 and 2.2.3 (I suspect all \
versions between 2.0.0 and 2.2.3 are broken).
This is due to how Resolv::IPv6#to_name and Resolv::Name.initialize work. In 2.2.3 \
Resolv::Name constructor was changed to convert labels to Resolv::Label::Str. Before \
that any comparison beween instances of Resolv::Name constructed from a string via \
Resolv::Name.create and Resolv::Name.new would fail. 1.9.3 is a bit different, as \
it's implementation of Resolv::Name.== converts labels to a string for the \
comparison.
Patch for ruby_2_0_0 branch attached.
----------------------------------------
Bug #12112: Resolv.getname with IPv6 noop
https://bugs.ruby-lang.org/issues/12112#change-57163
* 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')
=> []
~~~
---Files--------------------------------
12112_fixes_ipv6_ptr_resolver.patch (846 Bytes)
--
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>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic