diff options
Diffstat (limited to 'lib/Vyatta')
-rw-r--r-- | lib/Vyatta/Qos/TrafficLimiter.pm | 11 |
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() ) { |