From 9dcac6012b7ed37ba66605b561783fe7fcf32db5 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Tue, 20 Dec 2016 14:41:29 -0800 Subject: [PATCH] Remove redundent test Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Chains.pm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Shorewall/Perl/Shorewall/Chains.pm b/Shorewall/Perl/Shorewall/Chains.pm index f35daec30..2b5b7c207 100644 --- a/Shorewall/Perl/Shorewall/Chains.pm +++ b/Shorewall/Perl/Shorewall/Chains.pm @@ -1196,12 +1196,15 @@ sub compatible( $$ ) { } # # Don't combine chains where each specifies - # '-m policy' - # ( --multiport and ( --dport or --sport or -m multiport ) ) + # -m policy + # or when one specifies + # -m multiport + # and the other specifies + # --dport or --sport or -m multiport # return ! ( $ref1->{policy} && $ref2->{policy} || ( ( $ref1->{multiport} && ( $ref2->{dport} || $ref2->{sport} || $ref2->{multiport} ) ) || - ( $ref2->{multiport} && ( $ref1->{dport} || $ref1->{sport} || $ref1->{multiport} ) ) ) ); + ( $ref2->{multiport} && ( $ref1->{dport} || $ref1->{sport} ) ) ) ); } #