diff --git a/Shorewall-perl/Shorewall/Rules.pm b/Shorewall-perl/Shorewall/Rules.pm index 6b3bc70da..ac8505064 100644 --- a/Shorewall-perl/Shorewall/Rules.pm +++ b/Shorewall-perl/Shorewall/Rules.pm @@ -978,7 +978,7 @@ sub process_rule1 ( $$$$$$$$$$$ ) { # # Check for illegal bridge port rule # - if ( $zones{$sourcezone}->{type} eq 'bport4' ) { + if ( $zones{$destzone}->{type} eq 'bport4' ) { unless ( $zones{$sourcezone}{bridge} eq $zones{$destzone}{bridge} ) { return 1 if $wildcard; fatal_error "Rules with a DESTINATION Bridge Port zone must have a SOURCE zone on the same bridge"; @@ -1174,7 +1174,6 @@ sub process_rule ( $$$$$$$$$$ ) { my $intrazone = 0; my $includesrcfw = 1; my $includedstfw = 1; - my $optimize = $config{OPTIMIZE}; my $thisline = $line; # # Section Names are optional so once we get to an actual rule, we need to be sure that @@ -1226,8 +1225,6 @@ sub process_rule ( $$$$$$$$$$ ) { fatal_error "Invalid or missing ACTION ( $target )" unless defined $action; - $optimize = 0 if $action =~ /!$/; - if ( $source eq 'all' ) { for my $zone ( @zones ) { if ( $includesrcfw || ( $zones{$zone}{type} ne 'firewall' ) ) {