apply last bgp patch, thanks to yeled for testing

git-svn-id: http://www.observium.org/svn/observer/trunk@1807 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans 2011-03-08 17:34:17 +00:00
parent f66e5379cc
commit 2fd11cf9d0

View File

@ -87,13 +87,7 @@ if ($config['enable_bgp'])
## Get afi/safi and populate cbgp on cisco ios (xe/xr)
unset($af_list);
# FIXME: this could be replaced by the following line:
# $af_data = snmp_walk($device, "cbgpPeerAddrFamilyName." . $peer['ip'], "-OsQ", "CISCO-BGP4-MIB", $config['mibdir']);
# but I am unable to test it for now.
$af_cmd = $config['snmpwalk'] . " -M " . $config['mibdir'] . " -CI -m CISCO-BGP4-MIB -OsQ -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'] . " ";
$af_cmd .= "cbgpPeerAddrFamilyName." . $peer['ip'];
$af_data = shell_exec($af_cmd);
# FIXME replace until here
$af_data = snmp_walk($device, "cbgpPeerAddrFamilyName." . $peer['ip'], "-OsQ", "CISCO-BGP4-MIB", $config['mibdir']);
if ($debug) { echo("afi data :: $af_data \n"); }
$afs = trim(str_replace("cbgpPeerAddrFamilyName.".$peer['ip'].".", "", $af_data));