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:
Brian De Wolf
2011-07-07 10:42:00 -07:00
parent 3bb33fa8d4
commit feffa6d47e

View File

@@ -162,7 +162,7 @@ sub root_ip {
return $router_ip
if (( defined $router_ip )
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) ) );
# return the first one found here (should be only one)