From feffa6d47eb237d315e469d9c0f8040dfaf912d5 Mon Sep 17 00:00:00 2001 From: Brian De Wolf Date: Thu, 7 Jul 2011 10:42:00 -0700 Subject: [PATCH] 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. --- Info/Layer3.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Info/Layer3.pm b/Info/Layer3.pm index d179283d..985ac27d 100644 --- a/Info/Layer3.pm +++ b/Info/Layer3.pm @@ -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)