summaryrefslogtreecommitdiff
path: root/lib/resolv.rb
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2020-05-29 14:13:30 -0700
committerJeremy Evans <[email protected]>2020-05-29 15:59:27 -0700
commit04b5203a031d372b725e407519f10da6deda0e78 ()
tree6faa0dd32129c3defbc4b608eced1efc3e9d8a7f /lib/resolv.rb
parent02b216e5a70235f42f537e895d6f1afd05d8916a (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: Merged: https://.com/ruby/ruby/pull/3161
-rw-r--r--lib/resolv.rb1
1 files changed, 1 insertions, 0 deletions
@@ -767,6 +767,7 @@ class Resolv
end
def sender(msg, data, host, port=Port)
lazy_initialize
sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
return nil if !sock