[uboot-lantiq]
[openwrt.git] / package / qos-scripts / files / usr / lib / qos / generate.sh
index 9fc146b..6b5db3d 100755 (executable)
@@ -315,8 +315,10 @@ start_interface() {
                        cls_var maxrate "$class" limitrate $dir 100
                        cls_var prio "$class" priority $dir 1
                        cls_var avgrate "$class" avgrate $dir 0
                        cls_var maxrate "$class" limitrate $dir 100
                        cls_var prio "$class" priority $dir 1
                        cls_var avgrate "$class" avgrate $dir 0
+                       cls_var qdisc_esfq "$class" qdisc_esfq $dir ""
+                       [ "$qdisc_esfq" != "" ] && add_insmod sch_esfq
                        config_get classnr "$class" classnr
                        config_get classnr "$class" classnr
-                       append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate" "$N"
+                       append cstr "$classnr:$prio:$avgrate:$pktsize:$pktdelay:$maxrate:$qdisc_esfq" "$N"
                done
                append ${prefix}q "$(tcrules)" "$N"
                export dev_${dir}="ifconfig $dev up txqueuelen 5 >&- 2>&-
                done
                append ${prefix}q "$(tcrules)" "$N"
                export dev_${dir}="ifconfig $dev up txqueuelen 5 >&- 2>&-
@@ -378,7 +380,6 @@ start_cg() {
        local iptrules
        local pktrules
        local sizerules
        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
        enum_classes "$cg"
        add_rules iptrules "$ctrules" "iptables -t mangle -A ${cg}_ct"
        config_get classes "$cg" classes
@@ -395,12 +396,14 @@ start_cg() {
                config_get classgroup "$iface" classgroup
                config_get device "$iface" device
                config_get imqdev "$iface" imqdev
                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
                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"
                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"
                        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"
This page took 0.021769 seconds and 4 git commands to generate.