mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-23 08:03:11 +01:00
Allow port variables as the server port in DNAT rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d8eca457de
commit
5a9f179e25
@ -4832,7 +4832,7 @@ sub do_proto( $$$;$ )
|
|||||||
$multiport = 1;
|
$multiport = 1;
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Missing DEST PORT" unless supplied $ports;
|
fatal_error "Missing DEST PORT" unless supplied $ports;
|
||||||
$ports = validate_portpair $pname , $ports;
|
$ports = validate_portpair $pname , $ports unless $ports =~ /^\$/;
|
||||||
$output .= ( $srcndst ? "-m multiport ${invert}--ports ${ports} " : "${invert}--dport ${ports} " );
|
$output .= ( $srcndst ? "-m multiport ${invert}--ports ${ports} " : "${invert}--dport ${ports} " );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5039,7 +5039,7 @@ sub do_iproto( $$$ )
|
|||||||
$multiport = 1;
|
$multiport = 1;
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Missing DEST PORT" unless supplied $ports;
|
fatal_error "Missing DEST PORT" unless supplied $ports;
|
||||||
$ports = validate_portpair $pname , $ports;
|
$ports = validate_portpair $pname , $ports unless $ports =~ /^\$/;
|
||||||
|
|
||||||
if ( $srcndst ) {
|
if ( $srcndst ) {
|
||||||
push @output, multiport => "${invert}--ports ${ports}";
|
push @output, multiport => "${invert}--ports ${ports}";
|
||||||
|
Loading…
Reference in New Issue
Block a user