diff --git a/ChangeLog b/ChangeLog index 54496924..b58ce2f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-11-29 Mats Erik Andersson + + * whois/make_ip_del.pl: Compute netmasks correctly + also with 64-bit arithmetic. + 2011-11-26 Mats Erik Andersson * tests/tftp.sh: Return skip code if INET port is already in use. diff --git a/whois/make_ip_del.pl b/whois/make_ip_del.pl index cd98cf16..89ffaa55 100755 --- a/whois/make_ip_del.pl +++ b/whois/make_ip_del.pl @@ -29,7 +29,7 @@ while (<>) { my $m=$2; my $s=$3; my ($i1, $i2, $i3, $i4)=split(/\./, $1); print "{ ".(($i1<<24)+($i2<<16)+($i3<<8)+$i4)."UL, ". - (~(0xffffffff>>$m))."UL, \""; + (0xffffffff^(0xffffffff>>$m))."UL, \""; if ($s =~ /\./) { print "$s"; } else {