From f4cae55c1e95b6134330f8a3ff28e6968cf6531d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 28 Jan 2018 10:53:20 -0800 Subject: [PATCH] Correct order of optional interface and address variable handling Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Compiler.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index 67c6282d2..e48938d77 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -312,10 +312,8 @@ sub generate_script_2() { push_indent; if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) { - - set_global_variables(0, 0); - handle_optional_interfaces(0); + set_global_variables(0, 0); } emit ';;'; @@ -327,16 +325,14 @@ 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);