summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-11 15:54:31 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-11 15:54:31 -0700
commite7d228450c037ce16923dee385e127e7028d3358 (patch)
treecccd9168871fc8cd1d2e525ab699ec01f2401244
parent818bc720fdea8f1cfcc6e49a08dab2d5f149dae9 (diff)
downloadvyatta-cfg-qos-e7d228450c037ce16923dee385e127e7028d3358.tar.gz
vyatta-cfg-qos-e7d228450c037ce16923dee385e127e7028d3358.zip
IPV6 match fix
Bug 4548 The tc u32 filter command wants "ipv6" in protocol field but "ip6" in the match field. Make up your mind Alexey!
-rw-r--r--lib/Vyatta/Qos/Match.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Vyatta/Qos/Match.pm b/lib/Vyatta/Qos/Match.pm
index 8dda94d..dbcd3f1 100644
--- a/lib/Vyatta/Qos/Match.pm
+++ b/lib/Vyatta/Qos/Match.pm
@@ -88,6 +88,7 @@ sub filter {
printf "filter add dev %s parent %x:", $dev, $parent;
printf " prio %d", $prio if ($prio);
+
if ($proto ne 'ether') {
print " protocol $proto u32";
print " match $proto dsfield $$p{dsfield} 0xff" if $$p{dsfield};
@@ -98,6 +99,10 @@ sub filter {
print " protocol $type u32";
}
+
+ # workaround inconsistent usage in tc u32 match
+ $proto = 'ip6' if ($proto eq 'ipv6');
+
print " match $proto src $$p{src}" if $$p{src};
print " match $proto sport $$p{sport} 0xffff" if $$p{sport};
print " match $proto dst $$p{dst}" if $$p{dst};