mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
Fix zone-exclusion bug
This commit is contained in:
parent
8f94240e8f
commit
d74af30368
@ -1524,8 +1524,8 @@ sub process_section ($) {
|
||||
#
|
||||
# Build a source or destination zone list
|
||||
#
|
||||
sub build_zone_list( $$$\$ ) {
|
||||
my ($fw, $input, $which, $intrazoneref ) = @_;
|
||||
sub build_zone_list( $$$\$\$ ) {
|
||||
my ($fw, $input, $which, $intrazoneref, $wildref ) = @_;
|
||||
my $any = ( $input =~ s/^any/all/ );
|
||||
my $exclude;
|
||||
my $rest;
|
||||
@ -1539,6 +1539,8 @@ sub build_zone_list( $$$\$ ) {
|
||||
$exclude = $2;
|
||||
$rest = $3;
|
||||
|
||||
$$wildref = 1;
|
||||
|
||||
if ( defined $exclude ) {
|
||||
$exclude =~ s/!//;
|
||||
fatal_error "Invalid exclusion list (!$exclude)" if $exclude =~ /^,|!|,,|,$/;
|
||||
@ -1612,10 +1614,8 @@ sub process_rule ( ) {
|
||||
|
||||
fatal_error "Invalid or missing ACTION ($target)" unless defined $action;
|
||||
|
||||
@source = build_zone_list ( $fw, $source, 'SOURCE', $intrazone );
|
||||
@dest = build_zone_list ( $fw, $dest, 'DEST' , $intrazone );
|
||||
|
||||
$wild = ( @source > 1 ) || ( @dest > 1 );
|
||||
@source = build_zone_list ( $fw, $source, 'SOURCE', $intrazone, $wild );
|
||||
@dest = build_zone_list ( $fw, $dest, 'DEST' , $intrazone, $wild );
|
||||
|
||||
for $source ( @source ) {
|
||||
for $dest ( @dest ) {
|
||||
|
Loading…
Reference in New Issue
Block a user