зеркало из https://github.com/github/ruby.git
Convert ip addresses to canonical form in Resolv::DNS::Requester::UnconnectedUDP#sender
Otherwise, if the IP address given is not in canonical form, it won't match, and Resolv will ignore it. Fixes [Bug #16439]
This commit is contained in:
Родитель
02b216e5a7
Коммит
04b5203a03
|
@ -767,6 +767,7 @@ class Resolv
|
|||
end
|
||||
|
||||
def sender(msg, data, host, port=Port)
|
||||
host = Addrinfo.ip(host).ip_address
|
||||
lazy_initialize
|
||||
sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
|
||||
return nil if !sock
|
||||
|
|
Загрузка…
Ссылка в новой задаче