Blame SOURCES/ruby-3.0.0-Convert-ip-addresses-to-canonical-form.patch
|
|
a1e0cc |
From 2becb920e431110c4afc4fa069b051c5940c2096 Mon Sep 17 00:00:00 2001
|
|
|
a1e0cc |
From: Jeremy Evans <code@jeremyevans.net>
|
|
|
a1e0cc |
Date: Fri, 29 May 2020 14:13:30 -0700
|
|
|
a1e0cc |
Subject: [PATCH] Convert ip addresses to canonical form in
|
|
|
a1e0cc |
Resolv::DNS::Requester::UnconnectedUDP#sender
|
|
|
a1e0cc |
|
|
|
a1e0cc |
Otherwise, if the IP address given is not in canonical form, it
|
|
|
a1e0cc |
won't match, and Resolv will ignore it.
|
|
|
a1e0cc |
|
|
|
a1e0cc |
Fixes [Bug #16439]
|
|
|
a1e0cc |
---
|
|
|
a1e0cc |
lib/resolv.rb | 1 +
|
|
|
a1e0cc |
1 file changed, 1 insertion(+)
|
|
|
a1e0cc |
|
|
|
a1e0cc |
diff --git a/lib/resolv.rb b/lib/resolv.rb
|
|
|
a1e0cc |
index e7b45e785a85..d78531e174fd 100644
|
|
|
a1e0cc |
--- a/lib/resolv.rb
|
|
|
a1e0cc |
+++ b/lib/resolv.rb
|
|
|
a1e0cc |
@@ -774,6 +774,7 @@ def recv_reply(readable_socks)
|
|
|
a1e0cc |
end
|
|
|
a1e0cc |
|
|
|
a1e0cc |
def sender(msg, data, host, port=Port)
|
|
|
a1e0cc |
+ host = Addrinfo.ip(host).ip_address
|
|
|
a1e0cc |
lazy_initialize
|
|
|
a1e0cc |
sock = @socks_hash[host.index(':') ? "::" : "0.0.0.0"]
|
|
|
a1e0cc |
return nil if !sock
|