From 0c166d59d9adc0d73bf91f1f9f9b025c09d4948b Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 29 Mar 2010 12:04:53 -0700 Subject: Allow use of traffic-limiter for output policy Simple limiting on output. --- scripts/vyatta-qos.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'scripts/vyatta-qos.pl') 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; -- cgit v1.2.3