mirror of
https://github.com/manuelkasper/AS-Stats.git
synced 2025-02-20 11:44:12 +08:00
Fix for multiple entries with the same tag in the knownlinks file (e.g. for LACP).
This commit is contained in:
parent
28f0c03bad
commit
2f3e135afa
4
README
4
README
@ -5,6 +5,10 @@ by Manuel Kasper, Monzoon Networks AG <mkasper@monzoon.net>
|
||||
|
||||
Changes
|
||||
-------
|
||||
xxx Fix for multiple entries with the same tag in the
|
||||
knownlinks file (e.g. for LACP)
|
||||
(contributed by Michal Buchtik)
|
||||
|
||||
v1.32 Fix add_ds.sh to support new directory structure
|
||||
(contributed by Sergei Veltistov)
|
||||
|
||||
|
@ -74,6 +74,12 @@ function getknownlinks() {
|
||||
|
||||
list($routerip,$ifindex,$tag,$descr,$color) = preg_split("/\\t+/", $line);
|
||||
|
||||
$known = false;
|
||||
foreach ($knownlinks as $link) {
|
||||
if (in_array($tag,$link)) {$known=true;}
|
||||
}
|
||||
|
||||
if (!$known) {
|
||||
$knownlinks[] = array(
|
||||
'routerip' => $routerip,
|
||||
'ifindex' => $ifindex,
|
||||
@ -82,6 +88,7 @@ function getknownlinks() {
|
||||
'color' => $color
|
||||
);
|
||||
}
|
||||
}
|
||||
fclose($fd);
|
||||
|
||||
return $knownlinks;
|
||||
|
Loading…
x
Reference in New Issue
Block a user