Raise an error when a server list is specified in a DNAT or REDIRECT rule

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2014-06-08 08:52:41 -07:00
parent 1892cbf218
commit 9c9ae04c86

View File

@ -633,7 +633,7 @@ sub setup_netmap() {
} }
# #
# Called from process_rule1 to add a rule to the NAT table # Called from process_rule to add a rule to the NAT table
# #
sub handle_nat_rule( $$$$$$$$$$$$$ ) { sub handle_nat_rule( $$$$$$$$$$$$$ ) {
my ( $dest, # <server>[:port] my ( $dest, # <server>[:port]
@ -687,6 +687,11 @@ sub handle_nat_rule( $$$$$$$$$$$$$ ) {
# #
$server = $dest; $server = $dest;
} }
#
# Check for list in $server
#
fatal_error "An address list is not allowed in the DEST column of a $action RULE" if $server =~ /,/;
# #
# Generate the target # Generate the target
# #