From 2762fd2d35459452718e6d26e75f28d4a6453d5b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 9 Jun 2008 22:16:49 -0700 Subject: Fix speed detection on vlan interface Use speed of underlying interface. Bug 3137 --- scripts/VyattaQosUtil.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/VyattaQosUtil.pm b/scripts/VyattaQosUtil.pm index a4fd3f2..f847116 100644 --- a/scripts/VyattaQosUtil.pm +++ b/scripts/VyattaQosUtil.pm @@ -239,6 +239,9 @@ sub ethtoolRate { my $dev = shift; my $rate = undef; + # Get rate of real device (ignore vlan) + $dev =~ s/\.[0-9]+$//; + open(my $ethtool, "/usr/sbin/ethtool $dev 2>/dev/null |") or die "ethtool failed: $!\n"; -- cgit v1.2.3