Mario,

> I just changed in p0f-analyzer.pl line 79 INADDR_ANY to 127.0.0.1
> now this line looks like
> bind(S, sockaddr_in($port,127.0.0.1)) or die "bind: $!";

The IP address should be in packed form.

> Maybe Mark will change this in the distribution files?

--- p0f-analyzer.pl~    Wed Nov 29 20:25:35 2006
+++ p0f-analyzer.pl     Wed Jan  3 14:51:28 2007
@@ -68,4 +68,7 @@
   my($port) = untaint($ARGV[0]);
 
+# my($bind_addr) = '0.0.0.0';       # bind to all IPv4 interfaces
+  my($bind_addr) = '127.0.0.1';     # bind just to a loopback interface
+
   my(@inet_acl) = qw( 127.0.0.1 );   # list of IP addresses from which queries
                                      # will be accepted, others are ignored
@@ -77,5 +80,10 @@
                  $port, join(", ",@inet_acl))  if $debug;
   socket(S, PF_INET, SOCK_DGRAM, getprotobyname('udp')) or die "socket: $!";
-  bind(S, sockaddr_in($port,INADDR_ANY)) or die "bind: $!";
+
+  my($packed_addr);
+  $packed_addr = inet_aton($bind_addr)
+    or die "inet_aton: bad IP address [$bind_addr]: $!";
+  bind(S, sockaddr_in($port,$packed_addr))
+    or die "binding to [$bind_addr] failed: $!";
   my($fn_sock) = fileno(S); my($fn_stdin) = fileno(STDIN);
   my($rin,$rout); $rin = '';


Mark

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to