From 3aec0bd80003ead4775b237d7814a0adcf6dcc03 Mon Sep 17 00:00:00 2001 From: teastep Date: Mon, 14 May 2007 14:14:38 +0000 Subject: [PATCH] Fix overoptimization of port list handling; prevent run-time error with bcast address in providers file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6343 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 2 ++ Shorewall-perl/Shorewall/Providers.pm | 1 + 2 files changed, 3 insertions(+) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index c8bb4fa2b..b89939f7c 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -863,6 +863,8 @@ sub do_proto( $$$ ) $ports = validate_portpair $ports; $output .= "--dport $ports "; } + } else { + $multiport = ( ( $sports =~ tr/,/,/ ) > 0 ); } if ( $sports ne '' ) { diff --git a/Shorewall-perl/Shorewall/Providers.pm b/Shorewall-perl/Shorewall/Providers.pm index b650632f0..ca225ef84 100644 --- a/Shorewall-perl/Shorewall/Providers.pm +++ b/Shorewall-perl/Shorewall/Providers.pm @@ -27,6 +27,7 @@ package Shorewall::Providers; require Exporter; use Shorewall::Common; use Shorewall::Config; +use Shorewall::IPAddrs; use Shorewall::Zones; use Shorewall::Chains;