lib/phut/vhost_daemon.rb in phut-0.2.0 vs lib/phut/vhost_daemon.rb in phut-0.2.2
- old
+ new
@@ -83,10 +83,12 @@
def read_loop
loop do
raw_data, = raw_socket.recvfrom(8192)
udp = Pio::Udp.read(raw_data)
- # TODO: Check @options[:promisc]
+ unless @options[:promisc]
+ next if udp.ip_destination_address != @options.fetch(:ip_address)
+ end
@logger.info "Received: #{udp}"
@packets_received << udp.snapshot
end
end