mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
02b216e5a7
commit
04b5203a03
Notes:
git
2020-05-30 07:59:50 +09:00
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue