diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-05-29 14:13:30 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2020-05-29 15:59:27 -0700 |
commit | 04b5203a031d372b725e407519f10da6deda0e78 (patch) | |
tree | 6faa0dd32129c3defbc4b608eced1efc3e9d8a7f /lib/resolv.rb | |
parent | 02b216e5a70235f42f537e895d6f1afd05d8916a (diff) |
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]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3161
Diffstat (limited to 'lib/resolv.rb')
-rw-r--r-- | lib/resolv.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/resolv.rb b/lib/resolv.rb index e7b45e785a..d78531e174 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -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 |