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)
|
||||
|
||||
|
13
www/func.inc
13
www/func.inc
@ -73,14 +73,21 @@ function getknownlinks() {
|
||||
continue; /* empty line or comment */
|
||||
|
||||
list($routerip,$ifindex,$tag,$descr,$color) = preg_split("/\\t+/", $line);
|
||||
|
||||
$knownlinks[] = array(
|
||||
|
||||
$known = false;
|
||||
foreach ($knownlinks as $link) {
|
||||
if (in_array($tag,$link)) {$known=true;}
|
||||
}
|
||||
|
||||
if (!$known) {
|
||||
$knownlinks[] = array(
|
||||
'routerip' => $routerip,
|
||||
'ifindex' => $ifindex,
|
||||
'tag' => $tag,
|
||||
'descr' => $descr,
|
||||
'color' => $color
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
fclose($fd);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user