Просмотр исходного кода

bugfix: fix show mac-table in web for switches with mac-table by snmp index

root 3 лет назад
Родитель
Сommit
26c9f92b15
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      html/admin/devices/mactable.php

+ 3 - 2
html/admin/devices/mactable.php

@@ -24,10 +24,11 @@ print "<td>User</td>\n";
 print "<td>Mac</td>\n";
 print "</tr>";
 foreach ($ports as $port) {
+    if (!$dev['fdb_snmp_index']) { $port['snmp_index'] = $port['port']; }
     foreach ($fdb as $a_mac => $a_port) {
-	if ($a_port == $port['port']) {
+	if ($a_port == $port['snmp_index']) {
 		print "<tr>";
-		print "<td class=\"data\">" . $a_port . "</td>\n";
+		print "<td class=\"data\">" . $port['port'] . "</td>\n";
 	        $auth = get_auth_by_mac($db_link, dec_to_hex($a_mac));
                 print "<td class=\"data\">" .$auth['auth'] . "</td><td class=\"data\">". $auth['mac']."</td>\n";
 		print "</tr>";