lib/rubydns/resolver.rb in rubydns-1.0.2 vs lib/rubydns/resolver.rb in rubydns-1.0.3

- old
+ new

@@ -220,10 +220,10 @@ family = RubyDNS::address_family(host) socket = UDPSocket.new(family) socket.send(request.packet, 0, host, port) - data, (_, remote_port) = socket.recvfrom(UDP_TRUNCATION_SIZE) + data, (_, remote_port) = socket.recvfrom(UDP_TRUNCATION_SIZE, 0) # Need to check host, otherwise security issue. # May indicate some kind of spoofing attack: if port != remote_port raise InvalidResponseError.new("Data was not received from correct remote port (#{port} != #{remote_port})")