From 6cab1c3c8c0ac0b0167c589443a4a98e4b894e79 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Fri, 11 Sep 2020 13:11:44 -0700 Subject: [PATCH] Generate ALL_ACASTS during 'restore' processing Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Compiler.pm | 6 ++++-- Shorewall/Perl/Shorewall/Zones.pm | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index 42735904b..784ad74e3 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -281,7 +281,8 @@ sub generate_script_2() { '# Set global variables holding detected IP information' , '#' , 'detect_configuration()', - '{' ); + '{' + ); my $global_variables = have_global_variables; my $optional_interfaces = find_interfaces_by_option( 'optional' ); @@ -290,6 +291,7 @@ sub generate_script_2() { if ( have_address_variables || @$optional_interfaces ) { emit( 'local interface', + 'local iface', '', 'interface="$1"', '' @@ -312,7 +314,7 @@ sub generate_script_2() { if ( $global_variables == ( ALL_COMMANDS | NOT_RESTORE ) ) { verify_required_interfaces(0); - set_global_variables(0, 0); + set_global_variables($family == F_IPV4, 0); handle_optional_interfaces; } diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index aa1710026..8ce1e53c8 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -2437,11 +2437,10 @@ sub generate_all_acasts() { @wildacasts = '*' unless @wildacasts; - emit( 'local iface', - '', + emit( '', 'ALL_ACASTS=', '', - 'for iface in $(find_all_interfaces1); do' ); + 'for $iface in $(find_all_interfaces1); do' ); push_indent;