Correct order of optional interface and address variable handling

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-01-28 10:53:20 -08:00
parent cb7071a213
commit fbee4a91fd

View File

@ -312,10 +312,8 @@ sub generate_script_2() {
push_indent; push_indent;
if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) { if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) {
set_global_variables(0, 0);
handle_optional_interfaces(0); handle_optional_interfaces(0);
set_global_variables(0, 0);
} }
emit ';;'; emit ';;';
@ -327,16 +325,14 @@ sub generate_script_2() {
push_indent; push_indent;
} }
handle_optional_interfaces(1);
set_global_variables(1,1); set_global_variables(1,1);
if ( $global_variables & NOT_RESTORE ) { if ( $global_variables & NOT_RESTORE ) {
handle_optional_interfaces(1);
emit ';;'; emit ';;';
pop_indent; pop_indent;
pop_indent; pop_indent;
emit ( 'esac' ); emit ( 'esac' );
} else {
handle_optional_interfaces(1);
} }
} else { } else {
emit( 'true' ) unless handle_optional_interfaces(1); emit( 'true' ) unless handle_optional_interfaces(1);