#400 change IPv6 decode warning to be debug-only

This commit is contained in:
Oliver Gorwits
2021-10-07 09:01:45 +01:00
parent 9f12bcf676
commit 21f3b2b199

View File

@@ -363,7 +363,7 @@ sub ipv6_addr_prefixlength {
sub ipv6_addr {
my $info = shift;
my $return;
my $return = {};
my $indexes = $info->ipv6_index();
foreach my $row (keys %$indexes) {
my @parts = split(/\./, $row);
@@ -378,7 +378,8 @@ sub ipv6_addr {
if ($is_valid && $addrsize == 16) {
$return->{$row} = join(':', unpack('(H4)*', pack('C*', @parts)));
} else {
warn sprintf("%s: unable to decode table index to IPv6 address. Raw data is [%s].\n", &_my_sub_name, $row);
sprintf("%s: unable to decode table index to IPv6 address. Raw data is [%s].\n", &_my_sub_name, $row)
if $info->debug();
}
}
return $return;