diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-06-15 14:40:03 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@lenny.localdomain> | 2009-10-01 13:51:20 -0700 |
commit | 737f6fa46eefdcfda1150c9647c0a7a919de71ae (patch) | |
tree | b786da90016b2ad95ff1b56f91a557d5368cf904 /lib/Vyatta/Qos/Match.pm | |
parent | f8e91a2a8591fada3004bd5aee8912017799bf2b (diff) | |
download | vyatta-cfg-qos-737f6fa46eefdcfda1150c9647c0a7a919de71ae.tar.gz vyatta-cfg-qos-737f6fa46eefdcfda1150c9647c0a7a919de71ae.zip |
Fix mixed protocol matches
If matching on multiple protocols in same traffic-shaper class
then the filter command was garbaled.
Bug 4552
(cherry picked from commit 22e0d06a750abc2847e7e7bc96d8abf341a5bca1)
Diffstat (limited to 'lib/Vyatta/Qos/Match.pm')
-rw-r--r-- | lib/Vyatta/Qos/Match.pm | 10 |
1 files changed, 7 insertions, 3 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; } } |