Fix for multiple entries with the same tag in the

knownlinks file (e.g. for LACP).
This commit is contained in:
Manuel Kasper 2010-08-17 07:39:58 +00:00
parent 2f3e135afa
commit 944c0909ad

View File

@ -146,7 +146,13 @@ sub read_knownlinks {
next if (/(^\s*#)|(^\s*$)/); # empty line or comment
my ($routerip,$ifindex,$tag,$descr,$color) = split(/\t+/);
$knownlinks{"${routerip}_${ifindex}"} = $tag;
my $known = 0;
foreach my $link (values %knownlinks) {
if ($tag =~ $link) { $known=1; last; }
}
if ($known == 0) {
$knownlinks{"${routerip}_${ifindex}"} = $tag;
}
}
close(KLFILE);
}