* 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>
|
Fri Oct 9 10:12:13 2009 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* lib/irb/context.rb (IRB::Context#initialize):
|
* lib/irb/context.rb (IRB::Context#initialize):
|
||||||
|
@ -655,6 +655,7 @@ class Resolv
|
|||||||
def initialize
|
def initialize
|
||||||
super()
|
super()
|
||||||
@sock = UDPSocket.new
|
@sock = UDPSocket.new
|
||||||
|
@sock.do_not_reverse_lookup = true
|
||||||
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
||||||
DNS.bind_random_port(@sock)
|
DNS.bind_random_port(@sock)
|
||||||
end
|
end
|
||||||
@ -701,9 +702,10 @@ class Resolv
|
|||||||
@port = port
|
@port = port
|
||||||
is_ipv6 = host.index(':')
|
is_ipv6 = host.index(':')
|
||||||
@sock = UDPSocket.new(is_ipv6 ? Socket::AF_INET6 : Socket::AF_INET)
|
@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)
|
DNS.bind_random_port(@sock, is_ipv6)
|
||||||
@sock.connect(host, port)
|
@sock.connect(host, port)
|
||||||
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def recv_reply
|
def recv_reply
|
||||||
|
Loading…
x
Reference in New Issue
Block a user