From 264d0eb52d31b60bf59740b653b8ac727a9be3fb Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 18 Apr 2007 01:07:15 +0000 Subject: [PATCH] Fix last optimization git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5990 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 2f7a6d7fa..5cdfef8b3 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -646,7 +646,7 @@ sub do_proto( $$$ ) $output = "-p $proto "; if ( $ports ) { - if ( $ports =~ tr/,/,/ > 1 ) { + if ( $ports =~ tr/,/,/ > 0 ) { fatal_error "Port list requires Multiport support in your kernel/iptables: $ports" unless $capabilities{MULTIPORT}; fatal_error "Too many entries in port list: $ports" if $ports =~ tr/,:/,:/ > 14; @@ -658,7 +658,7 @@ sub do_proto( $$$ ) } if ( $sports ) { - if ( $sports =~ tr/,/,/ > 1 ) { + if ( $sports =~ tr/,/,/ > 0 ) { fatal_error "Port list requires Multiport support in your kernel/iptables: $sports" unless $capabilities{MULTIPORT}; fatal_error "Too many entries in port list: $sports" if $sports =~ tr/,:/,:/ > 14;