From 789854adce7e8507dba67c2b577b9434ef11c334 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 28 Jan 2018 14:54:06 -0800 Subject: [PATCH] Revert "Correct order of optional interface and address variable handling" This reverts commit fbee4a91fdcfa5cfc30bab87526c7b933a71575d. --- Shorewall/Perl/Shorewall/Compiler.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index e48938d77..67c6282d2 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -312,8 +312,10 @@ sub generate_script_2() { push_indent; if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) { - handle_optional_interfaces(0); + set_global_variables(0, 0); + + handle_optional_interfaces(0); } emit ';;'; @@ -325,14 +327,16 @@ sub generate_script_2() { push_indent; } - handle_optional_interfaces(1); set_global_variables(1,1); if ( $global_variables & NOT_RESTORE ) { + handle_optional_interfaces(1); emit ';;'; pop_indent; pop_indent; emit ( 'esac' ); + } else { + handle_optional_interfaces(1); } } else { emit( 'true' ) unless handle_optional_interfaces(1);