From 0c8cccc9f7029b25cda263bf6460d75e4d88d6d1 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 11 Jun 2007 16:32:38 +0000 Subject: [PATCH] add direction matching patch for qos-scripts from #1708 SVN-Revision: 7571 --- package/qos-scripts/files/usr/lib/qos/generate.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/package/qos-scripts/files/usr/lib/qos/generate.sh b/package/qos-scripts/files/usr/lib/qos/generate.sh index 9181d0b6f3..844bd70f9a 100755 --- a/package/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/qos-scripts/files/usr/lib/qos/generate.sh @@ -116,6 +116,14 @@ parse_matching_rule() { add_insmod ipt_connbytes append "$var" "-m connbytes --connbytes $value --connbytes-dir both --connbytes-mode bytes" ;; + *:direction) + value="$(echo "$value" | sed -e 's,-,:,g')" + if [ "$value" = "out" ]; then + append "$var" "-o $device" + elif [ "$value" = "in" ]; then + append "$var" "-i $device" + fi + ;; 1:pktsize) value="$(echo "$value" | sed -e 's,-,:,g')" add_insmod ipt_length @@ -357,6 +365,7 @@ start_cg() { append down "iptables -t mangle -A POSTROUTING -o $device -j IMQ --todev $imqdev" "$N" } append down "iptables -t mangle -A PREROUTING -i $device -j ${cg}" "$N" + append down "iptables -t mangle -A POSTROUTING -o $device -j ${cg}" "$N" append down "iptables -t mangle -A PREROUTING -i $device -j IMQ --todev $imqdev" "$N" } done -- 2.30.2