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