summaryrefslogtreecommitdiff
path: root/scripts/VyattaQosMatch.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-09-23 15:50:41 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-09-23 15:50:41 -0700
commit6ab5a0589ac4f0359679edbd3982c130038dfc1d (patch)
treed549d305f5633a97237bc1fe986c179394c216b7 /scripts/VyattaQosMatch.pm
parent200fb453f43a3f0406c14b9003ca5a1e6f7587f4 (diff)
downloadvyatta-cfg-qos-6ab5a0589ac4f0359679edbd3982c130038dfc1d.tar.gz
vyatta-cfg-qos-6ab5a0589ac4f0359679edbd3982c130038dfc1d.zip
Add incoming traffic limiting to Qos
This adds support for Qos using incoming policing. It is accepts the syntax and processes commands, but is not fully debugged. Bugfix: 3664
Diffstat (limited to 'scripts/VyattaQosMatch.pm')
-rw-r--r--scripts/VyattaQosMatch.pm10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/VyattaQosMatch.pm b/scripts/VyattaQosMatch.pm
index 0fedda2..9c9945d 100644
--- a/scripts/VyattaQosMatch.pm
+++ b/scripts/VyattaQosMatch.pm
@@ -56,7 +56,7 @@ sub _define {
}
sub filter {
- my ( $self, $out, $dev, $parent, $id, $dsmark ) = @_;
+ my ( $self, $out, $dev, $parent, $prio, $dsmark ) = @_;
my $ip = $self->{_ip};
my $indev = $self->{_dev};
my $vif = $self->{_vif};
@@ -69,14 +69,13 @@ sub filter {
# Special case for when dsmarking is used with ds matching
# original dscp is saved in tc_index
if (defined $dsmark && defined $ip && defined $$ip{dsfield}) {
- printf {$out} "filter add dev %s parent %x:0 protocol ip prio 1",
+ printf {$out} "filter add dev %s parent %x: protocol ip prio 1",
$dev, $parent;
- printf ${out} " handle %d tcindex classid %x:%x\n",
- $$ip{dsfield}, $parent, $id;
+ printf ${out} " handle %d tcindex", $$ip{dsfield};
return;
}
- printf {$out} "filter add dev %s parent %x:0 prio 1", $dev, $parent;
+ printf {$out} "filter add dev %s parent %x: prio %d", $dev, $parent, $prio;
if (defined $ip) {
print {$out} " protocol ip u32";
print {$out} " match ip dsfield $$ip{dsfield} 0xff"
@@ -98,5 +97,4 @@ sub filter {
print {$out} " match meta\(vlan mask 0xfff eq $vif\)"
if (defined $vif);
}
- printf {$out} " classid %x:%x\n", $parent, $id;
}