summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/TrafficLimiter.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-07 10:34:51 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-06-07 10:34:51 -0700
commita6fc0cd96c30422732fd4006dfed22fedc4c624d (patch)
treeef1c149e08e35a4ecdd9916a8ea68ba153e22fe2 /lib/Vyatta/Qos/TrafficLimiter.pm
parent4f12cc5f730a7759bc668b56165fe79b058dcfcd (diff)
downloadvyatta-cfg-qos-a6fc0cd96c30422732fd4006dfed22fedc4c624d.tar.gz
vyatta-cfg-qos-a6fc0cd96c30422732fd4006dfed22fedc4c624d.zip
Revert "Allow any Qos policy to be used for input"
This reverts commit c8f2c288665143e2b165b7d448555af9d657b56c. Conflicts: scripts/vyatta-qos.pl
Diffstat (limited to 'lib/Vyatta/Qos/TrafficLimiter.pm')
-rw-r--r--lib/Vyatta/Qos/TrafficLimiter.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Vyatta/Qos/TrafficLimiter.pm b/lib/Vyatta/Qos/TrafficLimiter.pm
index 246d593..2d973c5 100644
--- a/lib/Vyatta/Qos/TrafficLimiter.pm
+++ b/lib/Vyatta/Qos/TrafficLimiter.pm
@@ -76,8 +76,17 @@ sub _define {
}
sub commands {
- my ( $self, $dev, $parent ) = @_;
+ my ( $self, $dev, $direction ) = @_;
my $classes = $self->{_classes};
+ my $parent;
+
+ if ($direction eq 'in') {
+ $parent = 0xffff;
+ printf "qdisc add dev %s handle %x: ingress\n", $dev, $parent;
+ } else {
+ $parent = 1;
+ printf "qdisc add dev %s handle $x: prio\n", $dev, $parent;
+ }
foreach my $class (@$classes) {
foreach my $match ( $class->matchRules() ) {