diff options
Diffstat (limited to 'lib/Vyatta')
-rw-r--r-- | lib/Vyatta/Qos/Match.pm | 10 | ||||
-rw-r--r-- | lib/Vyatta/Qos/TrafficShaper.pm | 6 |
2 files changed, 9 insertions, 7 deletions
diff --git a/lib/Vyatta/Qos/Match.pm b/lib/Vyatta/Qos/Match.pm index 98b7286..682996f 100644 --- a/lib/Vyatta/Qos/Match.pm +++ b/lib/Vyatta/Qos/Match.pm @@ -63,7 +63,7 @@ sub new { } sub filter { - my ( $self, $dev, $parent, $prio, $dsmark ) = @_; + my ( $self, $dev, $parent, $classid, $prio, $dsmark ) = @_; # empty match return unless %{$self}; @@ -77,8 +77,9 @@ sub filter { printf "filter add dev %s parent %x: protocol %s prio 1", $dev, $parent, $ipver; - print " handle $$ip{dsfield} tcindex", - } + printf " handle %s tcindex classid %x:%x\n", + $$ip{dsfield}, $parent, $classid; + } return; } @@ -114,6 +115,8 @@ sub filter { print " match $sel dst $$p{dst}" if $$p{dst}; print " match $sel dport $$p{dport} 0xffff" if $$p{dport}; } + + printf " classid %x:%x\n", $parent, $classid; } my $indev = $self->{_indev}; @@ -123,5 +126,6 @@ sub filter { print " protocol all basic"; print " match meta\(rt_iif eq $indev\)" if $indev; print " match meta\(vlan mask 0xfff eq $vif\)" if $vif; + printf " classid %x:%x\n", $parent, $classid; } } diff --git a/lib/Vyatta/Qos/TrafficShaper.pm b/lib/Vyatta/Qos/TrafficShaper.pm index 10bc90a..f89ae60 100644 --- a/lib/Vyatta/Qos/TrafficShaper.pm +++ b/lib/Vyatta/Qos/TrafficShaper.pm @@ -134,8 +134,7 @@ sub commands { foreach my $class (@$classes) { $class->dsmarkClass( 1, $dev ); foreach my $match ( $class->matchRules() ) { - $match->filter( $dev, 1, 1 ); - printf " classid %x:%x\n", $parent, $class->{id}; + $match->filter( $dev, $parent, $class->{id}, 1 ); } } @@ -153,8 +152,7 @@ sub commands { $class->gen_leaf( $dev, $parent, $rate ); foreach my $match ( $class->matchRules() ) { - $match->filter( $dev, $parent, 1, $class->{dsmark} ); - printf " classid %x:%x\n", $parent, $class->{id}; + $match->filter( $dev, $parent, $class->{id}, 1, $class->{dsmark} ); } } } |