From: Arne Fitzenreiter Date: Sun, 20 Oct 2019 20:18:34 +0000 (+0000) Subject: Revert "QoS: Drop tc filter rules to move marked packets into the correct class" X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=bebc33813ae29578b4297947971afe76925c8954 Revert "QoS: Drop tc filter rules to move marked packets into the correct class" This reverts commit 63f7d7475e97d74d4bcd23bd739b6b1721e55e14. --- diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl index 0c07a60f13..b820e5f6ce 100644 --- a/config/qos/makeqosscripts.pl +++ b/config/qos/makeqosscripts.pl @@ -131,6 +131,12 @@ case "\$1" in tc -s class show dev $qossettings{'IMQ_DEV'} exit 0 ;; + filter) + echo "[filter]" + tc -s filter show dev $qossettings{'RED_DEV'} + tc -s filter show dev $qossettings{'IMQ_DEV'} + exit 0 + ;; iptables) echo "[iptables]" iptables -t mangle -n -L QOS-OUT -v -x 2> /dev/null @@ -141,6 +147,7 @@ case "\$1" in esac \$0 \$1 qdisc \$0 \$1 class + \$0 \$1 filter \$0 \$1 iptables exit 0 ;; @@ -223,6 +230,25 @@ foreach $subclassentry (sort @subclasses) { print "\ttc qdisc add dev $qossettings{'DEVICE'} parent 1:$qossettings{'SCLASS'} handle $qossettings{'SCLASS'}: fq_codel $fqcodel_options\n"; } } +print "\n\t### FILTER TRAFFIC INTO CLASSES\n"; +foreach $classentry (sort @classes) +{ + @classline = split( /\;/, $classentry ); + if ($qossettings{'RED_DEV'} eq $classline[0]) { + $qossettings{'DEVICE'} = $classline[0]; + $qossettings{'CLASS'} = $classline[1]; + print "\ttc filter add dev $qossettings{'DEVICE'} parent 1:0 prio 0 protocol ip handle $qossettings{'CLASS'} fw flowid 1:$qossettings{'CLASS'}\n"; + } +} +foreach $subclassentry (sort @subclasses) { + @subclassline = split( /\;/, $subclassentry ); + if ($qossettings{'RED_DEV'} eq $subclassline[0]) { + $qossettings{'DEVICE'} = $subclassline[0]; + $qossettings{'CLASS'} = $subclassline[1]; + $qossettings{'SCLASS'} = $subclassline[2]; + print "\ttc filter add dev $qossettings{'DEVICE'} parent 1:0 prio 0 protocol ip handle $qossettings{'SCLASS'} fw flowid 1:$qossettings{'SCLASS'}\n"; + } +} print <