summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-29 12:04:53 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-03-29 12:15:17 -0700
commit0c166d59d9adc0d73bf91f1f9f9b025c09d4948b (patch)
treefd82e04e15590ee1dac16b8e6df5bdfe1896fcaf /scripts
parent9abea22b6029c506cff3f88fb5a93d9b2206e256 (diff)
downloadvyatta-cfg-qos-0c166d59d9adc0d73bf91f1f9f9b025c09d4948b.tar.gz
vyatta-cfg-qos-0c166d59d9adc0d73bf91f1f9f9b025c09d4948b.zip
Allow use of traffic-limiter for output policy
Simple limiting on output.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-qos.pl9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index 487fdc6..c962324 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -35,8 +35,11 @@ my %policies = (
'round-robin' => 'RoundRobin',
'priority-queue' => 'Priority',
'random-detect' => 'RandomDetect',
+ 'traffic-limiter' => 'TrafficLimiter',
},
- 'in' => { 'traffic-limiter' => 'TrafficLimiter', }
+ 'in' => {
+ 'traffic-limiter' => 'TrafficLimiter',
+ }
);
# find policy for name - also check for duplicates
@@ -119,7 +122,7 @@ sub delete_interface {
my $arg = $delcmd{$direction};
die "bad direction $direction\n" unless $arg;
-
+
my $cmd = "sudo tc qdisc del dev $interface ". $arg . " 2>/dev/null";
# ignore errors (may have no qdisc)
@@ -207,7 +210,7 @@ sub interfaces_using {
# these are arguments to update_interface()
push @inuse, [ $name, $direction, $policy ]
- if ($cur eq $policy);
+ if ($cur eq $policy);
}
}
return @inuse;