Make IPv6 logic safer; cosmetic improvements in the generated script

This commit is contained in:
Tom Eastep 2011-02-06 08:57:48 -08:00
parent 2c2fdab0fe
commit 6e66736d28

View File

@ -347,7 +347,7 @@ sub generate_script_3($) {
emit_unindented $currentline while read_a_line;
emit_unindented 'EOF';
emit 'reload_kernel_modules < ${VARDIR}/.modules';
emit '', 'reload_kernel_modules < ${VARDIR}/.modules';
} else {
emit 'load_kernel_modules Yes';
}
@ -355,6 +355,8 @@ sub generate_script_3($) {
emit 'load_kernel_modules Yes';
}
emit '';
if ( $family == F_IPV4 ) {
load_ipsets;
@ -387,8 +389,13 @@ sub generate_script_3($) {
emit "disable_ipv6\n" if $config{DISABLE_IPV6};
} else {
emit ( '[ "$COMMAND" = refresh ] && run_refresh_exit || run_init_exit',
emit ( 'if [ "$COMMAND" = refresh ]; then' ,
' run_refresh_exit' ,
'else' ,
' run_init_exit',
'fi',
'' );
save_dynamic_chains;
mark_firewall_not_started;