diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-06-11 16:32:38 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-06-11 16:32:38 +0000 |
commit | 3dd8226794840df911b467780abfcb989857b595 (patch) | |
tree | d6d9f399f0ca40b248c5d20cbd8713c84eb2f2c3 /package | |
parent | 3e99ade5a2f6331d7a101e0555a06489cc9bf31c (diff) | |
download | upstream-3dd8226794840df911b467780abfcb989857b595.tar.gz upstream-3dd8226794840df911b467780abfcb989857b595.tar.bz2 upstream-3dd8226794840df911b467780abfcb989857b595.zip |
add direction matching patch for qos-scripts from #1708
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7571 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rwxr-xr-x | package/qos-scripts/files/usr/lib/qos/generate.sh | 9 |
1 files changed, 9 insertions, 0 deletions
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 |