diff --git a/ChangeLog b/ChangeLog index 1ed1cc9a71..b8d76f3173 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sun May 7 03:09:51 2006 Stephan Maka + + * lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP#initialize): + Use AF_INET6 for nameservers containing colons. + Mon May 1 17:58:16 2006 Masaki Suketa * 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