diff --git a/Shorewall/Perl/Shorewall/Compiler.pm b/Shorewall/Perl/Shorewall/Compiler.pm index e0ec3f57b..bf54bacd6 100644 --- a/Shorewall/Perl/Shorewall/Compiler.pm +++ b/Shorewall/Perl/Shorewall/Compiler.pm @@ -471,7 +471,7 @@ sub generate_script_3($) { fi EOF pop_indent; - setup_forwarding( $family ); + setup_forwarding( $family , 1 ); push_indent; emit<<'EOF'; set_state "Started" @@ -480,7 +480,7 @@ else if [ $COMMAND = refresh ]; then chainlist_reload EOF - setup_forwarding( $family ); + setup_forwarding( $family , 0 ); emit<<'EOF'; run_refreshed_exit do_iptables -N shorewall @@ -490,7 +490,7 @@ EOF restore_dynamic_rules conditionally_flush_conntrack EOF - setup_forwarding( $family ); + setup_forwarding( $family , 0 ); emit<<'EOF'; run_start_exit do_iptables -N shorewall diff --git a/Shorewall/Perl/Shorewall/Proc.pm b/Shorewall/Perl/Shorewall/Proc.pm index 8c2246c85..d79de4525 100644 --- a/Shorewall/Perl/Shorewall/Proc.pm +++ b/Shorewall/Perl/Shorewall/Proc.pm @@ -192,8 +192,8 @@ sub setup_source_routing( $ ) { } } -sub setup_forwarding( $ ) { - my $family = shift; +sub setup_forwarding( $$ ) { + my ( $family, $first ) = @_; if ( $family == F_IPV4 ) { if ( $config{IP_FORWARDING} eq 'on' ) { @@ -219,12 +219,11 @@ sub setup_forwarding( $ ) { my $interfaces = find_interfaces_by_option 'forward'; if ( @$interfaces ) { - progress_message2 "$doing Interface forwarding..."; push_indent; push_indent; - save_progress_message 'Setting up IPv6 Interface Forwarding...'; + save_progress_message 'Setting up IPv6 Interface Forwarding...' if $first; for my $interface ( @$interfaces ) { my $file = "/proc/sys/net/ipv6/conf/$interface/forwarding";