forked from extern/shorewall_code
Correct port list capture with --multiport.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
613e41c25a
commit
5cdb74168f
@ -2853,7 +2853,13 @@ sub get_dports( $ ) {
|
||||
if ( my $multiref = $ruleref->{multiport} ) {
|
||||
if ( reftype $multiref ) {
|
||||
for ( @$multiref ) {
|
||||
$ports .= ",$1" if /^--dports (.*)/;
|
||||
if ( /^--dports (.*)/ ) {
|
||||
if ( $ports ) {
|
||||
$ports .= ",$1";
|
||||
} else {
|
||||
$ports = $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ports = $1 if $multiref =~ /^--dports (.*)/;
|
||||
@ -2873,7 +2879,13 @@ sub get_multi_sports( $ ) {
|
||||
if ( my $multiref = $_[0]->{multiport} ) {
|
||||
if ( reftype $multiref ) {
|
||||
for ( @$multiref ) {
|
||||
$ports .= ",$1" if /^--sports (.*)/;
|
||||
if ( /^--sports (.*)/ ) {
|
||||
if ( $ports ) {
|
||||
$ports .= ",$1";
|
||||
} else {
|
||||
$ports = $1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$ports = $1 if $multiref =~ /^--sports (.*)/;
|
||||
|
Loading…
Reference in New Issue
Block a user