Remove limit of 10 tcdevices

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5318 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-01-27 19:02:35 +00:00
parent 5fc6b9b2ab
commit 36c3880649

View File

@ -38,7 +38,7 @@
setup_traffic_shaping() setup_traffic_shaping()
{ {
local mtu r2q tc_all_devices device mark rate ceil prio options devfile=$(find_file tcdevices) classfile=$(find_file tcclasses) devnum=1 last_device= local mtu r2q tc_all_devices device mark rate ceil prio options devfile=$(find_file tcdevices) classfile=$(find_file tcclasses) devnum=1 last_device=
r2q=10 indent= r2q=10 indent= prefix=1
rate_to_kbit() { rate_to_kbit() {
local rateunit rate local rateunit rate
@ -184,7 +184,7 @@ setup_traffic_shaping()
defmark=$(get_defmark_for_dev $device) defmark=$(get_defmark_for_dev $device)
run_tc qdisc add dev $device root handle $devnum: htb default 1$defmark run_tc qdisc add dev $device root handle $devnum: htb default ${prefix}${defmark}
save_command "${dev}_mtu=\$(get_device_mtu $device)" save_command "${dev}_mtu=\$(get_device_mtu $device)"
run_tc "class add dev $device parent $devnum: classid $devnum:1 htb rate $outband mtu \$${dev}_mtu" run_tc "class add dev $device parent $devnum: classid $devnum:1 htb rate $outband mtu \$${dev}_mtu"
@ -240,7 +240,7 @@ setup_traffic_shaping()
# #
mark=$(($mark)) mark=$(($mark))
classid=$devnum:1$mark classid=$devnum:${prefix}${mark}
[ -n "$devnum" ] || fatal_error "Device $device not defined in $devfile" [ -n "$devnum" ] || fatal_error "Device $device not defined in $devfile"
@ -249,7 +249,7 @@ setup_traffic_shaping()
save_command "[ \$${dev}_mtu -gt $quantum ] && quantum=\$${dev}_mtu || quantum=$quantum" save_command "[ \$${dev}_mtu -gt $quantum ] && quantum=\$${dev}_mtu || quantum=$quantum"
run_tc "class add dev $device parent $devnum:1 classid $classid htb rate $rate ceil $ceil prio $prio mtu \$${dev}_mtu quantum \$quantum" run_tc "class add dev $device parent $devnum:1 classid $classid htb rate $rate ceil $ceil prio $prio mtu \$${dev}_mtu quantum \$quantum"
run_tc qdisc add dev $device parent $classid handle 1$mark: sfq perturb 10 run_tc qdisc add dev $device parent $classid handle ${prefix}${mark}: sfq perturb 10
# #
# add filters # add filters
# #
@ -306,6 +306,8 @@ __EOF__
INDENT=" " INDENT=" "
if [ -s $TMP_DIR/tcdevices ]; then if [ -s $TMP_DIR/tcdevices ]; then
[ $(list_count1 $all_tc_devices) -gt 10 ] && prefix=10
save_progress_message "Setting up Traffic Control..." save_progress_message "Setting up Traffic Control..."
progress_message2 "$DOING $devfile..." progress_message2 "$DOING $devfile..."