mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 14:01:05 +02:00
add direction matching patch for qos-scripts from #1708
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7571 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
60e51cd89c
commit
c9c60d5d8c
@ -116,6 +116,14 @@ parse_matching_rule() {
|
|||||||
add_insmod ipt_connbytes
|
add_insmod ipt_connbytes
|
||||||
append "$var" "-m connbytes --connbytes $value --connbytes-dir both --connbytes-mode bytes"
|
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)
|
1:pktsize)
|
||||||
value="$(echo "$value" | sed -e 's,-,:,g')"
|
value="$(echo "$value" | sed -e 's,-,:,g')"
|
||||||
add_insmod ipt_length
|
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 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 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"
|
append down "iptables -t mangle -A PREROUTING -i $device -j IMQ --todev $imqdev" "$N"
|
||||||
}
|
}
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user