summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@ubnt.com>2013-10-04 16:27:49 -0700
committerDaniil Baturin <daniil@baturin.org>2014-01-23 22:34:00 +0100
commitf061da6ae1b5ee7634db859a26c10c85d50deb38 (patch)
treeae49f8b59c8d29324d3a05fb5790dfda3f64a2ca
parentd65d5a51ba76af337e94e5c709d913ef2ec7fb9e (diff)
downloadvyatta-cfg-qos-f061da6ae1b5ee7634db859a26c10c85d50deb38.tar.gz
vyatta-cfg-qos-f061da6ae1b5ee7634db859a26c10c85d50deb38.zip
Bug #86: Apply unique prio for all matches
This was also suggested by Carl Byington. Signed-off-by: Daniil Baturin <daniil@baturin.org>
-rw-r--r--lib/Vyatta/Qos/Priority.pm2
-rw-r--r--lib/Vyatta/Qos/TrafficShaper.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Vyatta/Qos/Priority.pm b/lib/Vyatta/Qos/Priority.pm
index 4b7654d..9fb5bce 100644
--- a/lib/Vyatta/Qos/Priority.pm
+++ b/lib/Vyatta/Qos/Priority.pm
@@ -104,9 +104,9 @@ sub commands {
$def_prio, $def_prio, $def_prio;
# prio is not really classful!
+ my $prio = 1;
foreach my $class (@$classes) {
$class->gen_leaf( $dev, $parent );
- my $prio = 1;
foreach my $match ( $class->matchRules() ) {
$match->filter( $dev, $parent, $class->{id}, $prio++ );
}
diff --git a/lib/Vyatta/Qos/TrafficShaper.pm b/lib/Vyatta/Qos/TrafficShaper.pm
index 5e365c5..672471e 100644
--- a/lib/Vyatta/Qos/TrafficShaper.pm
+++ b/lib/Vyatta/Qos/TrafficShaper.pm
@@ -200,11 +200,11 @@ sub commands {
printf "class add dev %s parent %x: classid %x:1 htb rate %s\n",
$dev, $parent, $parent, $rate;
+ my $prio = 1;
foreach my $class (@$classes) {
$class->gen_class( $dev, 'htb', $parent, $rate, $r2q );
$class->gen_leaf( $dev, $parent, $rate );
- my $prio = 1;
foreach my $match ( $class->matchRules() ) {
$match->filter( $dev, $parent, $class->{id}, $prio++,
$class->{dsmark} );