lib/net/dns/resolver.rb in net-dns2-0.8.1 vs lib/net/dns/resolver.rb in net-dns2-0.8.2

- old
+ new

@@ -1016,11 +1016,17 @@ end end ans = self.send(method, packet, packet_data) - unless ans + # Don't have any responses with the raw, + # since currently raw is only used when source_address is changed + if @raw + return nil + end + + if not ans message = "No response from nameservers list" @logger.fatal(message) raise NoResponseError, message end @@ -1259,11 +1265,10 @@ packet.eth_daddr = PacketFu::Utils.arp(ns.to_s, {iface: @config[:interface]}) octet.read_quad ns.to_s packet.ip_dst = octet packet.udp_dst = 53 packet.recalc arg=:all - puts packet.inspect packet.to_w @config[:interface] end nil end @@ -1293,10 +1298,9 @@ packet.eth_daddr = PacketFu::Utils.arp(ns.to_s, {iface: @config[:interface]}) octet.read_quad ns.to_s packet.ip_dst = octet packet.udp_dst = 53 packet.recalc arg=:all - puts packet.inspect packet.to_w @config[:interface] end nil end