diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 9b51d8067..89cba0f2d 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -4682,13 +4682,21 @@ sub create_chainlist_reload($) { my $chains = $_[0]; - my @chains = split_list $chains, 'chain'; + my @chains; - unless ( @chains ) { - @chains = qw( blacklst ) if $filter_table->{blacklst}; - push @chains, 'blackout' if $filter_table->{blackout}; - push @chains, 'mangle:' if have_capability( 'MANGLE_ENABLED' ) && $config{MANGLE_ENABLED}; - $chains = join( ',', @chains ) if @chains; + unless ( $chains eq ':none:' ) { + if ( $chains eq ':refresh:' ) { + $chains = ''; + } else { + @chains = split_list $chains, 'chain'; + } + + unless ( @chains ) { + @chains = qw( blacklst ) if $filter_table->{blacklst}; + push @chains, 'blackout' if $filter_table->{blackout}; + push @chains, 'mangle:' if have_capability( 'MANGLE_ENABLED' ) && $config{MANGLE_ENABLED}; + $chains = join( ',', @chains ) if @chains; + } } $mode = NULL_MODE; diff --git a/Shorewall/Perl/compiler.pl b/Shorewall/Perl/compiler.pl index e3f435b5a..5757df4e6 100755 --- a/Shorewall/Perl/compiler.pl +++ b/Shorewall/Perl/compiler.pl @@ -73,7 +73,7 @@ my $shorewall_dir = ''; my $verbose = 0; my $timestamp = 0; my $debug = 0; -my $chains = ''; +my $chains = ':none:'; my $log = ''; my $log_verbose = 0; my $help = 0; diff --git a/Shorewall/shorewall b/Shorewall/shorewall index 04fdd7296..97198869d 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -826,6 +826,8 @@ refresh_command() { g_refreshchains="$g_refreshchains,$1" shift done + else + g_refreshchains=:refresh: fi shorewall_is_started || fatal_error "Shorewall is not running" @@ -1470,7 +1472,7 @@ g_verbose_offset=0 g_use_verbosity= g_debug= g_export= -g_refreshchains= +g_refreshchains=:none: # # Make sure that these variables are cleared diff --git a/Shorewall6/shorewall6 b/Shorewall6/shorewall6 index 15b80555a..893b5ddcc 100755 --- a/Shorewall6/shorewall6 +++ b/Shorewall6/shorewall6 @@ -757,6 +757,8 @@ refresh_command() { g_refreshchains="$g_refreshchains,$1" shift done + else + g_refreshchains=:refresh: fi shorewall6_is_started || fatal_error "Shorewall6 is not running" @@ -1378,6 +1380,7 @@ g_verbose_offset=0 g_use_verbosity= g_debug= g_export= +g_refreshchains=:none: g_noroutes= g_purge=