From a504820d1953ba639c1be3a9b2f76318f972d45d Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 7 Aug 2017 16:56:30 -0700 Subject: [PATCH] Correct optimize level 8 handling of policy and policychain Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index 85ec4fd5b..e2bdaea75 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -3900,6 +3900,12 @@ sub optimize_level8( $$$ ) { } $combined{ $chainref1->{name} } = $chainref->{name}; + + if ( $chainref->{policychain} ) { + $chainref1->{policychain} = $chainref->{policychain}, $chainref1->{policy} = $chainref->{policy} unless $chainref1->{policychain}; + } elsif ( $chainref1->{policychain} ) { + $chainref->{policychain} = $chainref1->{policychain}, $chainref->{policy} = $chainref1->{policy} unless $chainref->{policychain}; + } } } }