Fix grep statement in L3 root_ip
The grep statement was comparing the router_ip with the SNMP OID-looking keys instead of the values which were just the IPs.
This commit is contained in:
@@ -162,7 +162,7 @@ sub root_ip {
|
|||||||
return $router_ip
|
return $router_ip
|
||||||
if (( defined $router_ip )
|
if (( defined $router_ip )
|
||||||
and ( $router_ip ne '0.0.0.0' )
|
and ( $router_ip ne '0.0.0.0' )
|
||||||
and ( grep { $_ eq $router_ip } (keys %$ospf_ip))
|
and ( grep { $ospf_ip->{$_} eq $router_ip } (keys %$ospf_ip))
|
||||||
and ( $l3->snmp_connect_ip($router_ip) ) );
|
and ( $l3->snmp_connect_ip($router_ip) ) );
|
||||||
|
|
||||||
# return the first one found here (should be only one)
|
# return the first one found here (should be only one)
|
||||||
|
|||||||
Reference in New Issue
Block a user