From: Martin Mares Date: Sun, 28 Jan 2018 23:15:13 +0000 (+0100) Subject: show-switch: work-around for broken hispeed X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5337e5df530860e2bf808c37e505c9f86b99381f;p=jablonka.git show-switch: work-around for broken hispeed --- diff --git a/show-switch b/show-switch index 733f93b..9dab19c 100755 --- a/show-switch +++ b/show-switch @@ -123,6 +123,10 @@ my %if_macs = (); for my $if (values %$if_table) { $if->{mac} = join(':', map { sprintf "%02x", ord $_ } split(//, $if->{mac})); $if_macs{$if->{mac}} = 1; + if ($if->{hispeed} == $if->{speed}) { + # Some buggy switches put hispeed == speed + delete $if->{hispeed}; + } } print "# Interface table:\n", Dumper($if_table) if $debug; my @ifaces = sort { $a <=> $b } keys %$if_table;