summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-06-09 22:16:49 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-06-09 22:16:49 -0700
commit2762fd2d35459452718e6d26e75f28d4a6453d5b (patch)
tree707dee10e5d3e82a5b14886d06b62ee690eda607 /scripts
parentb90702a4ce498172f7cfec2b45c875c959cc5081 (diff)
downloadvyatta-cfg-qos-2762fd2d35459452718e6d26e75f28d4a6453d5b.tar.gz
vyatta-cfg-qos-2762fd2d35459452718e6d26e75f28d4a6453d5b.zip
Fix speed detection on vlan interface
Use speed of underlying interface. Bug 3137
Diffstat (limited to 'scripts')
-rw-r--r--scripts/VyattaQosUtil.pm3
1 files changed, 3 insertions, 0 deletions
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";