diff options
author | Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> | 2010-10-04 21:25:48 +0000 |
---|---|---|
committer | Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr> | 2010-10-04 21:25:48 +0000 |
commit | 39fc8e6d0849dc24442ba8833404be0e4b507179 (patch) | |
tree | 5aaa86f51ff307e79f6c07af5b54935a3bfa01db /package/qos-scripts/files | |
parent | ec7dbb838c113e49cdc612031f25d7df74b322ce (diff) | |
download | master-187ad058-39fc8e6d0849dc24442ba8833404be0e4b507179.tar.gz master-187ad058-39fc8e6d0849dc24442ba8833404be0e4b507179.tar.bz2 master-187ad058-39fc8e6d0849dc24442ba8833404be0e4b507179.zip |
[package] qos-scripts: Fix generation of IMQ firewall rules on halfduplex mode (#7800)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23227 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/qos-scripts/files')
-rwxr-xr-x | package/qos-scripts/files/usr/lib/qos/generate.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/package/qos-scripts/files/usr/lib/qos/generate.sh b/package/qos-scripts/files/usr/lib/qos/generate.sh index 02c3933d19..6b5db3d7dc 100755 --- a/package/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/qos-scripts/files/usr/lib/qos/generate.sh @@ -380,7 +380,6 @@ start_cg() { local iptrules local pktrules local sizerules - local download enum_classes "$cg" add_rules iptrules "$ctrules" "iptables -t mangle -A ${cg}_ct" config_get classes "$cg" classes @@ -397,12 +396,14 @@ start_cg() { config_get classgroup "$iface" classgroup config_get device "$iface" device config_get imqdev "$iface" imqdev - config_get dl "$iface" download + config_get upload "$iface" upload + config_get download "$iface" download config_get halfduplex "$iface" halfduplex + download="${download:-${halfduplex:+$upload}}" add_insmod ipt_IMQ append up "iptables -t mangle -A OUTPUT -o $device -j ${cg}" "$N" append up "iptables -t mangle -A FORWARD -o $device -j ${cg}" "$N" - [ -z "$dl" ] || { + [ -z "$download" ] || { append down "iptables -t mangle -A POSTROUTING -o $device -j ${cg}" "$N" [ -z "$halfduplex" ] || { append down "iptables -t mangle -A POSTROUTING -o $device -j IMQ --todev $imqdev" "$N" |