Don't allow port redirection with UDPLITE

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-03-10 08:32:45 -07:00
parent 6e9fc77f73
commit fd2fcc996f

View File

@ -641,6 +641,10 @@ sub handle_nat_rule( $$$$$$$$$$$$ ) {
$server = $1; # May be empty
$serverport = $2; # Not Empty due to RE
my ( $p ) = split( ':', $proto ); # Might be "tcp:syn"
fatal_error "Port-redirection is not supported for UDPLITE" if resolve_proto( $p ) == UDPLITE;
$origdstports = validate_port( $proto, $ports ) if $ports && $ports ne '-' && port_count( $ports ) == 1;
if ( $serverport =~ /^(\d+)-(\d+)$/ ) {