From a7bdfcc47b88a34eb34d530cda2bb3b3d84815e1 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Thu, 11 Sep 2014 20:58:01 -0700 Subject: [PATCH] Refine the rule reduction fix Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Zones.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Zones.pm b/Shorewall/Perl/Shorewall/Zones.pm index ee53460ac..98b323c67 100644 --- a/Shorewall/Perl/Shorewall/Zones.pm +++ b/Shorewall/Perl/Shorewall/Zones.pm @@ -2124,8 +2124,9 @@ sub find_hosts_by_option( $ ) { my %done; for my $interface ( @interfaces ) { - if ( ! $interfaces{$interface}{zone} && $interfaces{$interface}{options}{$option} ) { - push @hosts, [ $interface, '', ALLIP , [] ]; + my $value = $interfaces{$interface}{options}{$option}; + if ( ! $interfaces{$interface}{zone} && $value ) { + push @hosts, [ $interface, '', ALLIP , [], $value ]; $done{$interface} = 1; } }