(plugin) network::cisco::standard::snmp - mode bgp fix empty localAddr (#4199)
This commit is contained in:
parent
c4f4f0face
commit
8f09c4f849
|
@ -219,7 +219,10 @@ sub manage_selection {
|
|||
}
|
||||
|
||||
my $local;
|
||||
if (length($result->{localAddr}) == 4) {
|
||||
# it can be empty
|
||||
if (length($result->{localAddr}) == 0) {
|
||||
$local = '-';
|
||||
} elsif (length($result->{localAddr}) == 4) {
|
||||
$local = Socket::inet_ntop(Socket::AF_INET, $result->{localAddr}) . ':' . $result->{localPort};
|
||||
} else {
|
||||
$local = '[' . Socket::inet_ntop(Socket::AF_INET6, $result->{localAddr}) . ']:' . $result->{localPort};
|
||||
|
|
Loading…
Reference in New Issue