summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/TrafficLimiter.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Qos/TrafficLimiter.pm')
-rw-r--r--lib/Vyatta/Qos/TrafficLimiter.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Vyatta/Qos/TrafficLimiter.pm b/lib/Vyatta/Qos/TrafficLimiter.pm
index 0a5809f..665f784 100644
--- a/lib/Vyatta/Qos/TrafficLimiter.pm
+++ b/lib/Vyatta/Qos/TrafficLimiter.pm
@@ -85,13 +85,11 @@ sub commands {
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;
- }
+ die "traffic-policy limiter only applies for incoming traffic\n"
+ unless ($direction eq 'in');
+
+ $parent = 0xffff;
+ printf "qdisc add dev %s handle %x: ingress\n", $dev, $parent;
# find largest class id (to use for default)
my $maxid = 0;