Subject: | cidrs2inverse() wrongly returns /32 |
If the first arg is a /32 and then second is the same /32 or a superset
range, cidrs2inverse wrongly returns the /32:
my $obj1 = new2 Net::Netmask ('1.0.0.4/32');
my $obj2 = new2 Net::Netmask ('1.0.0.0/8');
die Net::Netmask::errstr if Net::Netmask::errstr;
my @leftover_ranges = cidrs2inverse($obj1, $obj2);
if (@leftover_ranges) {
print "Bug: Array should be empty but got: $leftover_ranges[0]";
}
else {
print "Good. Array is empty.";
}