* lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP): disable
reverse lookup. (Resolv::DNS::Requester::UnconnectedUDP): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
696eec1e4f
commit
2ea82d336d
@ -1,3 +1,9 @@
|
||||
Fri Oct 9 21:14:40 2009 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* lib/resolv.rb (Resolv::DNS::Requester::ConnectedUDP): disable
|
||||
reverse lookup.
|
||||
(Resolv::DNS::Requester::UnconnectedUDP): ditto.
|
||||
|
||||
Fri Oct 9 10:12:13 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* lib/irb/context.rb (IRB::Context#initialize):
|
||||
|
@ -655,6 +655,7 @@ class Resolv
|
||||
def initialize
|
||||
super()
|
||||
@sock = UDPSocket.new
|
||||
@sock.do_not_reverse_lookup = true
|
||||
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
||||
DNS.bind_random_port(@sock)
|
||||
end
|
||||
@ -701,9 +702,10 @@ class Resolv
|
||||
@port = port
|
||||
is_ipv6 = host.index(':')
|
||||
@sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
|
||||
@sock.do_not_reverse_lookup = true
|
||||
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
||||
DNS.bind_random_port(@sock, is_ipv6)
|
||||
@sock.connect(host, port)
|
||||
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
||||
end
|
||||
|
||||
def recv_reply
|
||||
|
Loading…
x
Reference in New Issue
Block a user