From 9c9ae04c863ab8f5e0ed3affa6862872dd7665a3 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 8 Jun 2014 08:52:41 -0700 Subject: [PATCH] Raise an error when a server list is specified in a DNAT or REDIRECT rule Signed-off-by: Tom Eastep --- Shorewall/Perl/Shorewall/Nat.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Shorewall/Perl/Shorewall/Nat.pm b/Shorewall/Perl/Shorewall/Nat.pm index 6e4efb414..5d90d28a1 100644 --- a/Shorewall/Perl/Shorewall/Nat.pm +++ b/Shorewall/Perl/Shorewall/Nat.pm @@ -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( $$$$$$$$$$$$$ ) { my ( $dest, # [:port] @@ -687,6 +687,11 @@ sub handle_nat_rule( $$$$$$$$$$$$$ ) { # $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 #