mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 12:14:32 +01:00
More multiport improvements
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@6176 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
ae925d06e1
commit
6852e09ba3
@ -784,15 +784,15 @@ sub do_proto( $$$ )
|
|||||||
$output = "-p $proto ";
|
$output = "-p $proto ";
|
||||||
}
|
}
|
||||||
|
|
||||||
my $dismultiport = 0;
|
my $multiport = 0;
|
||||||
|
|
||||||
if ( $ports ne '' ) {
|
if ( $ports ne '' ) {
|
||||||
if ( $ports =~ tr/,/,/ > 0 ) {
|
if ( $ports =~ tr/,/,/ > 0 || $sports =~ tr/,/,/ > 0 ) {
|
||||||
fatal_error "Port list requires Multiport support in your kernel/iptables: $ports" unless $capabilities{MULTIPORT};
|
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 port_count( $ports ) > 15;
|
fatal_error "Too many entries in port list: $ports" if port_count( $ports ) > 15;
|
||||||
$ports = validate_port_list $ports;
|
$ports = validate_port_list $ports;
|
||||||
$output .= "-m multiport --dports $ports ";
|
$output .= "-m multiport --dports $ports ";
|
||||||
$dismultiport = 1;
|
$multiport = 1;
|
||||||
} else {
|
} else {
|
||||||
$ports = validate_portpair $ports;
|
$ports = validate_portpair $ports;
|
||||||
$output .= "--dport $ports ";
|
$output .= "--dport $ports ";
|
||||||
@ -800,7 +800,7 @@ sub do_proto( $$$ )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( $sports ne '' ) {
|
if ( $sports ne '' ) {
|
||||||
if ( $sports =~ tr/,/,/ > 0 || $dismultiport ) {
|
if ( $sports =~ tr/,/,/ > 0 || $multiport ) {
|
||||||
fatal_error "Port list requires Multiport support in your kernel/iptables: $sports" unless $capabilities{MULTIPORT};
|
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 port_count( $sports ) > 15;
|
fatal_error "Too many entries in port list: $sports" if port_count( $sports ) > 15;
|
||||||
$sports = validate_port_list $sports;
|
$sports = validate_port_list $sports;
|
||||||
|
Loading…
Reference in New Issue
Block a user