forked from extern/shorewall_code
Don't generate refresh rules unless the command is 'refresh'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
68136ea53a
commit
bf9309e441
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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=
|
||||
|
Loading…
Reference in New Issue
Block a user