diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-05-07 02:56:06 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-05-07 02:56:06 +0000 |
commit | 8afbf5cc03e5dc94a22dea209e50db7c64bf9eda (patch) | |
tree | 7148e481dbb310a74af41a07609a8c96efc888e1 | |
parent | 08b5a86487d16b32c7dd6704ec350d775be6120e (diff) | |
download | ruby-8afbf5cc03e5dc94a22dea209e50db7c64bf9eda.tar.gz |
* lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize):
Use AF_INET6 for nameservers containing colons.
patch by Stephan Maka.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | lib/resolv.rb | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Sun May 7 03:09:51 2006 Stephan Maka <stephan@spaceboyz.net> + + * lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize): + Use AF_INET6 for nameservers containing colons. + Mon May 1 17:58:16 2006 Masaki Suketa <masaki.suketa@nifty.ne.jp> * ext/win32ole/win32ole.c (add_event_call_back): should not diff --git a/lib/resolv.rb b/lib/resolv.rb index 6bc41d7967..300901fdf0 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -637,7 +637,7 @@ class Resolv super() @host = host @port = port - @sock = UDPSocket.new + @sock = UDPSocket.new(host.index(':') ? Socket::AF_INET6 : Socket::AF_INET) @sock.connect(host, port) @sock.fcntl(Fcntl::F_SETFD, 1) if defined? Fcntl::F_SETFD @id = -1 |