diff --git a/README b/README index 61f4eb1..4e0cb39 100644 --- a/README +++ b/README @@ -5,6 +5,10 @@ by Manuel Kasper, Monzoon Networks AG 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) diff --git a/www/func.inc b/www/func.inc index 09a2791..1ac8249 100644 --- a/www/func.inc +++ b/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);