Cosmetic: Cleanup initial comments block.
[netdnsspoof.git] / netdnsspoof
index 140ffac..ce43530 100755 (executable)
@@ -1,6 +1,7 @@
 #! /usr/bin/perl
 #
-#      $Id$
+# $Id$
+
 
 use strict;
 use warnings;
@@ -147,7 +148,7 @@ my($msg)=@_;
                }
        $reply->header()->id($query->header()->id());
        my $reply_back=$reply->data();
-       warn "parsing reply back to the original query host..." if $D;
+       warn "passing reply back to the original query host..." if $D;
        send $sock_udp,$reply_back,0,$query_from_addr or cluck "send(): $!";
 }
 
@@ -162,6 +163,7 @@ for (;;) {
        die "Invalid select(2): ".Dumper($got) if !defined $got || $got<0;
 
        for my $sock ($sock_udp,$sock_udp_priv) {
+               next if !vec($rfds,fileno($sock),1);
                my $msg;
                defined(my $from_addr=recv $sock,$msg,0x1000,0) or do { cluck "recv(): $!"; next; };
                warn "got packet." if $D;