Fix Use of uninitialized value in substr at /usr/share/perl5/SNMP/Info/IPv6.pm line 113. It is caused by an empty mac in local loopback interface on cisco devices.

Signed-off-by: Jeroen van Ingen <jeroen@utwente.nl>
This commit is contained in:
Michael Borgelt
2011-09-13 11:59:09 +02:00
committed by Jeroen van Ingen
parent 8199e2a973
commit c9a36f12e6

View File

@@ -108,7 +108,7 @@ sub ipv6_n2p_mac {
$v6addr = join('.', $addrtype, $addrsize, $v6addr);
$addrtype = 2;
}
if ($addrtype == 2) { # IPv6
if (($addrtype == 2) && (defined $phys_addr->{$row})) { # IPv6
$return->{$row} = substr($phys_addr->{$row}, 0, 17);
}
}