From ba4170471de90b2a32abeff6b48ec13461e7f9b1 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 11 Jun 2009 15:54:31 -0700 Subject: 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! (cherry picked from commit e7d228450c037ce16923dee385e127e7028d3358) --- lib/Vyatta/Qos/Match.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Vyatta') 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}; -- cgit v1.2.3