Package: ip2host Version: 0.09-3
ip2host as distributed generates lots of useless errors like so: Use of uninitialized value in gethostbyaddr at /usr/bin/ip2host line 118, <GEN49> line 4. Use of uninitialized value in gethostbyaddr at /usr/bin/ip2host line 118, <GEN23> line 15. Use of uninitialized value in gethostbyaddr at /usr/bin/ip2host line 118, <GEN63> line 40. Use of uninitialized value in gethostbyaddr at /usr/bin/ip2host line 118, <GEN37> line 27. These are caused by IPs in the logs for which there is no PTR record. The following patch solves the problem. Andrew McNaughton --- /usr/bin/ip2host.orig 2004-10-27 14:32:25.000000000 +1100 +++ /usr/bin/ip2host 2009-12-30 12:35:10.000000000 +1100 @@ -114,8 +114,9 @@ my $host = undef; eval { # Try to resolve, but give up after $TIMEOUT seconds alarm($Opt{timeout}); - my $ip_struct = inet_aton $ip; - $host = gethostbyaddr $ip_struct, AF_INET; + if(my $ip_struct = inet_aton $ip) { + $host = gethostbyaddr $ip_struct, AF_INET; + } alarm(0); }; # XXX Debug -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org