Subject: | contains() and within() should check the address family |
Hello,
Just played around a bit and noticed that the following check works for
every IPv4 address:
use NetAddr::IP;
my $net_a = NetAddr::IP->new('::', 0) or die;
my $net_b = NetAddr::IP->new('1.2.3.4') or die;
print "V6 contains V4\n" if ($net_a->contains($net_b));
In my opinion it should be checked if both NetAddr::IP objects have the
same address family or version.
-- Matthias