Detect degenerate addr:port[-range] in SNAT rules.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-11-02 15:28:00 -07:00
parent 4169520d63
commit c376740329
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -5573,6 +5573,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
} else {
my $ports = $addr;
$ports =~ s/^://;
fatal_error "Missing Address or Port[-range] ($addr)" unless supplied $ports && $ports ne '-';
validate_portpair1( $proto, $ports );
$addrlist .= " --to-source :$ports";
$exceptionrule = do_proto( $proto, '', '' );