[2980789] Fix root_ip to try OSPF RouterID first (Brian De Wolf)

This commit is contained in:
Oliver Gorwits
2012-04-12 14:50:38 +01:00
parent 9e545e8cf8
commit 295e6fb283
2 changed files with 7 additions and 4 deletions

View File

@@ -21,6 +21,7 @@ version 2.07 ()
* [3297786] LLDP INDEX munged to ignore TimeMark component (David Baldwin) * [3297786] LLDP INDEX munged to ignore TimeMark component (David Baldwin)
* [3317739] Fix for Baystack without POE on stack member 1 (David Baldwin) * [3317739] Fix for Baystack without POE on stack member 1 (David Baldwin)
* [2037444] os_ver fails on some Extreme versions (Robert Kerr) * [2037444] os_ver fails on some Extreme versions (Robert Kerr)
* [2980789] Fix root_ip to try OSPF RouterID first (Brian De Wolf)
version 2.06 (2011-09-28) version 2.06 (2011-09-28)

View File

@@ -163,6 +163,12 @@ sub root_ip {
my $router_ip = $l3->router_ip(); my $router_ip = $l3->router_ip();
my $ospf_ip = $l3->ospf_ip(); my $ospf_ip = $l3->ospf_ip();
# if the router ip exists, we use it instead of OSPF host entries
return $router_ip
if (( defined $router_ip )
and ( $router_ip ne '0.0.0.0' )
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)
if ( defined $ospf_ip and scalar( keys %$ospf_ip ) ) { if ( defined $ospf_ip and scalar( keys %$ospf_ip ) ) {
foreach my $key ( keys %$ospf_ip ) { foreach my $key ( keys %$ospf_ip ) {
@@ -174,10 +180,6 @@ sub root_ip {
} }
} }
return $router_ip
if (( defined $router_ip )
and ( $router_ip ne '0.0.0.0' )
and ( $l3->snmp_connect_ip($router_ip) ) );
return; return;
} }