append "$var" "${proto:+-p $proto}"
for option in $options; do
config_get value "$section" "$option"
-
+
case "$pkt:$option" in
*:srchost)
append "$var" "-s $value"
config_get device "$iface" device
config_get_bool enabled "$iface" enabled 1
[ -z "$device" -o 1 -ne "$enabled" ] && {
- return 1
+ return 1
}
config_get upload "$iface" upload
config_get_bool halfduplex "$iface" halfduplex
config_get download "$iface" download
config_get classgroup "$iface" classgroup
config_get_bool overhead "$iface" overhead 0
-
+
download="${download:-${halfduplex:+$upload}}"
enum_classes "$classgroup"
for dir in ${halfduplex:-up} ${download:+down}; do
local var="$1"
local rules="$2"
local prefix="$3"
-
+
for rule in $rules; do
unset iptrule
config_get target "$rule" target
for command in $iptables; do
cat <<EOF
- $command -w -t mangle -N qos_${cg}
+ $command -w -t mangle -N qos_${cg}
$command -w -t mangle -N qos_${cg}_ct
EOF
done