mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 12:20:42 +01:00
Avoid compiling traffic shaping twice
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4781 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
bbb71aacc5
commit
5551fe4589
@ -9,6 +9,8 @@ Changes in 3.3.4
|
||||
|
||||
4) Turn off POLICY_MATCH if no IPSEC.
|
||||
|
||||
5) Only compile traffic shaping once.
|
||||
|
||||
Changes in 3.3.4
|
||||
|
||||
1) Make exclusion work with "show zones"
|
||||
|
@ -937,8 +937,11 @@ setup_tc1() {
|
||||
save_progress_message "Setting up Traffic Control..."
|
||||
append_file $TC_SCRIPT
|
||||
elif [ "$TC_ENABLED" = Internal ]; then
|
||||
strip_file_and_lib_load tcdevices tc
|
||||
strip_file_and_lib_load tcclasses tc && setup_traffic_shaping
|
||||
if [ -n "$LIB_tc_LOADED" ]; then
|
||||
save_command
|
||||
save_command setup_traffic_shaping
|
||||
save_command
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1047,8 +1050,10 @@ __EOF__
|
||||
if [ -n "$TC_SCRIPT" ]; then
|
||||
save_progress_message "Refreshing Traffic Shaping"
|
||||
run_user_exit $TC_SCRIPT
|
||||
elif [ "$TC_ENABLED" = Internal ]; then
|
||||
[ -n "$LIB_tc_LOADED" ] && setup_traffic_shaping
|
||||
elif [ "$TC_ENABLED" = Internal -a -n "$LIB_tc_LOADED" ]; then
|
||||
save_command
|
||||
save_command setup_traffic_shaping
|
||||
save_command
|
||||
fi
|
||||
}
|
||||
|
||||
@ -1089,6 +1094,7 @@ compile_refresh_firewall()
|
||||
INDENT=""
|
||||
|
||||
save_command "}"
|
||||
save_command
|
||||
|
||||
}
|
||||
|
||||
@ -4540,7 +4546,7 @@ activate_rules()
|
||||
fi
|
||||
done
|
||||
#
|
||||
# Now add the jumps to the interface (first) chains from FORWARD, INPUT and POSTROUTING
|
||||
# Now add the jumps to the interface chains from FORWARD, INPUT, OUTPUT and POSTROUTING
|
||||
#
|
||||
for interface in $ALL_INTERFACES ; do
|
||||
run_iptables -A FORWARD -i $interface -j $(forward_chain $interface)
|
||||
@ -5227,6 +5233,16 @@ __EOF__
|
||||
[ -d \${VARDIR} ] || mkdir -p \${VARDIR}
|
||||
|
||||
}
|
||||
__EOF__
|
||||
|
||||
if [ "$TC_ENABLED" = Internal ]; then
|
||||
strip_file_and_lib_load tcdevices tc
|
||||
strip_file_and_lib_load tcclasses tc
|
||||
|
||||
[ -n "$LIB_tc_LOADED" ] && setup_traffic_shaping
|
||||
fi
|
||||
|
||||
cat >&3 << __EOF__
|
||||
|
||||
#
|
||||
# Start/Restart/Reload the firewall
|
||||
|
@ -291,6 +291,17 @@ setup_traffic_shaping()
|
||||
validate_tcdevices_file
|
||||
validate_tcclasses_file
|
||||
|
||||
cat >&3 << __EOF__
|
||||
|
||||
#
|
||||
# Set up Traffic Shaping
|
||||
#
|
||||
setup_traffic_shaping()
|
||||
{
|
||||
__EOF__
|
||||
|
||||
INDENT=" "
|
||||
|
||||
if [ -s $TMP_DIR/tcdevices ]; then
|
||||
save_progress_message "Setting up Traffic Control..."
|
||||
progress_message2 "$DOING $devfile..."
|
||||
@ -330,5 +341,11 @@ setup_traffic_shaping()
|
||||
done < $TMP_DIR/tcclasses
|
||||
|
||||
[ -n "$last_device" ] && finish_device
|
||||
|
||||
fi
|
||||
|
||||
INDENT=
|
||||
|
||||
save_command "}"
|
||||
save_command
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user