mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Avoid Perl diagnostic when updating shorewall[6].conf
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e7318459f1
commit
ce73c783dc
@ -5530,6 +5530,8 @@ sub update_config_file( $ ) {
|
|||||||
for ( qw/DROP_DEFAULT REJECT_DEFAULT BLACKLIST_DEFAULT/ ) {
|
for ( qw/DROP_DEFAULT REJECT_DEFAULT BLACKLIST_DEFAULT/ ) {
|
||||||
my $policy = $config{ $_ };
|
my $policy = $config{ $_ };
|
||||||
|
|
||||||
|
$policy = '' unless defined $policy;
|
||||||
|
|
||||||
if ( $policy =~ /\bA_(?:Drop|Reject)\b/ ) {
|
if ( $policy =~ /\bA_(?:Drop|Reject)\b/ ) {
|
||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
$policy =~ s/A_(?:Drop|Reject)/Broadcast(A_DROP),Multicast(A_DROP)/;
|
$policy =~ s/A_(?:Drop|Reject)/Broadcast(A_DROP),Multicast(A_DROP)/;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user