summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/Match.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-16 17:12:54 -0700
committerStephen Hemminger <shemminger@lenny.localdomain>2009-10-01 13:51:21 -0700
commit4a86133a0d7a4d20887c2f2d726d1558f47c476b (patch)
treecce0cc65b7df610341389c12f54474c3869e8032 /lib/Vyatta/Qos/Match.pm
parent6736b2088a169d10e179e561e603e9e6993513fa (diff)
downloadvyatta-cfg-qos-4a86133a0d7a4d20887c2f2d726d1558f47c476b.tar.gz
vyatta-cfg-qos-4a86133a0d7a4d20887c2f2d726d1558f47c476b.zip
Fix match rules for traffic limiter
Need to pass police string in to Match filter generator. Bug 4596 (cherry picked from commit 340773bacdacbb88586ff0ea8d053990205bd538)
Diffstat (limited to 'lib/Vyatta/Qos/Match.pm')
-rw-r--r--lib/Vyatta/Qos/Match.pm9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Vyatta/Qos/Match.pm b/lib/Vyatta/Qos/Match.pm
index 033aee1..327fbd4 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, $classid, $prio, $dsmark ) = @_;
+ my ( $self, $dev, $parent, $classid, $prio, $dsmark, $police ) = @_;
# empty match
return unless %{$self};
@@ -126,8 +126,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;
+ print " $police" if $police;
+ printf " flowid %x:%x\n", $parent, $classid;
}
my $indev = $self->{_indev};
@@ -137,6 +137,7 @@ 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;
+ print " $police" if $police;
+ printf " flowid %x:%x\n", $parent, $classid;
}
}