Detect port-range in a port-list without XMULTIPORT

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7020 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-08-01 14:58:26 +00:00
parent 02fb1dd86c
commit 686655304d

View File

@ -829,6 +829,12 @@ sub validate_portpair( $ ) {
sub validate_port_list( $ ) {
my $result = '';
my $list = $_[0];
my @list = split/,/, $list;
if ( @list > 1 && $list =~ /:/ ) {
require_capability( 'XMULTIPORT' , 'Port ranges in a port list', '' );
}
for my $port ( split/,/, $_[0] ) {
my $value = validate_portpair( $port );