summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/TrafficShaper.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-19 14:10:58 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-10-19 14:10:58 -0700
commitbcb18b96605e194cf8c186467b0a4d853695f75e (patch)
tree964be5859411d2be8834fe21d337fa2662d2d6a0 /lib/Vyatta/Qos/TrafficShaper.pm
parentc1cda1e4495a6db1decb35e0e73ede71342d3ab0 (diff)
downloadvyatta-cfg-qos-bcb18b96605e194cf8c186467b0a4d853695f75e.tar.gz
vyatta-cfg-qos-bcb18b96605e194cf8c186467b0a4d853695f75e.zip
Add nested shaper classes
This adds: traffic-policy myexample { bandwidth 100Mbit class 2 { class 2a { ...
Diffstat (limited to 'lib/Vyatta/Qos/TrafficShaper.pm')
-rw-r--r--lib/Vyatta/Qos/TrafficShaper.pm11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/Vyatta/Qos/TrafficShaper.pm b/lib/Vyatta/Qos/TrafficShaper.pm
index 4d43c4e..a923981 100644
--- a/lib/Vyatta/Qos/TrafficShaper.pm
+++ b/lib/Vyatta/Qos/TrafficShaper.pm
@@ -147,15 +147,8 @@ sub commands {
printf "class add dev %s parent %x: classid %x:1 htb rate %s\n",
$dev, $parent, $parent, $rate;
- foreach my $class (@$classes) {
- $class->gen_class( $dev, 'htb', $parent, $rate );
- $class->gen_leaf( $dev, $parent, $rate );
-
- my $prio = 1;
- foreach my $match ( $class->matchRules() ) {
- $match->filter( $dev, $parent, $class->{id}, $prio++,
- $class->{dsmark} );
- }
+ foreach my $class (sort { $a->{id} <=> $b->{id} } @$classes) {
+ $class->commands( $dev, 'htb', $parent, $rate);
}
}