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
ffe7a1b777
commit
11ff245697
@ -4679,13 +4679,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;
|
||||
|
@ -827,6 +827,8 @@ refresh_command() {
|
||||
g_refreshchains="$g_refreshchains,$1"
|
||||
shift
|
||||
done
|
||||
else
|
||||
g_refreshchains=:refresh:
|
||||
fi
|
||||
|
||||
shorewall_is_started || fatal_error "Shorewall is not running"
|
||||
@ -1480,7 +1482,7 @@ g_verbose_offset=0
|
||||
g_use_verbosity=
|
||||
g_debug=
|
||||
g_export=
|
||||
g_refreshchains=
|
||||
g_refreshchains=:none:
|
||||
|
||||
#
|
||||
# Make sure that these variables are cleared
|
||||
|
@ -758,6 +758,8 @@ refresh_command() {
|
||||
g_refreshchains="$g_refreshchains,$1"
|
||||
shift
|
||||
done
|
||||
else
|
||||
g_refreshchains=:refresh:
|
||||
fi
|
||||
|
||||
shorewall6_is_started || fatal_error "Shorewall6 is not running"
|
||||
@ -1388,6 +1390,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