diff --git a/html/pages/device/bgp.inc.php b/html/pages/device/bgp.inc.php
index 4f402e999..92e755fa8 100644
--- a/html/pages/device/bgp.inc.php
+++ b/html/pages/device/bgp.inc.php
@@ -55,6 +55,7 @@ echo("
" . $peer['bgpPeerOutUpdates'] . "");
+ if ($_GET['opta'] && $_GET['opta'] != "macaccounting") {
foreach(explode(" ", $_GET['opta']) as $graph_type) {
if($graph_type == "cbgp_prefixes") { list($afi, $safi) = explode(".", $_GET['optb']); $afisafi = "&afi=$afi&safi=$safi"; }
if($graph_type == "bgp_updates" || $valid_afi_safi[$afi][$safi]) {
@@ -76,10 +77,10 @@ echo("
if ($_GET['opta'] == "macaccounting") {
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `ipv4_mac` AS I, mac_accounting AS M WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address"),0)) {
-
$acc = mysql_fetch_array(mysql_query("SELECT * FROM `ipv4_mac` AS I, mac_accounting AS M WHERE I.ipv4_address = '".$peer['bgpPeerIdentifier']."' AND M.mac = I.mac_address"));
-
$graph_type = "mac_acc";
+ $database = $config['rrd_dir'] . "/" . $device['hostname'] . "/mac-accounting/" . $acc['ifIndex'] . "-" . $acc['mac'] . ".rrd";
+ if ( is_file($database) ) {
$daily_traffic = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=210&height=100";
$daily_url = "graph.php?id=" . $acc['ma_id'] . "&type=$graph_type&from=$day&to=$now&width=500&height=150";
@@ -105,9 +106,12 @@ echo("
echo("");
}
+}
}
}
+}
+
$i++;
}
echo("");
diff --git a/includes/discovery/cisco-vrf.php b/includes/discovery/cisco-vrf.php
index dd69deeec..a7cb3cd80 100755
--- a/includes/discovery/cisco-vrf.php
+++ b/includes/discovery/cisco-vrf.php
@@ -31,7 +31,7 @@
}
$vrf_id = @mysql_result(mysql_query("SELECT vrf_id FROM vrfs WHERE `device_id` = '".$device['device_id']."' AND `vrf_oid`='".$vrf['oid']."'"),0);
$valid_vrf[$vrf_id] = 1;
- echo("\nRD:".$vrf['mplsVpnVrfRouteDistinguisher']." ".$vrf['mplsVpnVrfDescription']." ");
+ echo("\nRD:".$vrf['mplsVpnVrfRouteDistinguisher']." ".$vrf['name']." ".$vrf['mplsVpnVrfDescription']." ");
$interfaces_oid = ".1.3.6.1.3.118.1.2.1.1.2." . $vrf['oid'];
$interfaces = shell_exec($config['snmpwalk'] . " -m MPLS-VPN-MIB -CI -Ln -Osqn -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " $interfaces_oid");
$interfaces = trim(str_replace($interfaces_oid . ".", "", $interfaces));