Handle omitted port[-range] in SNAT correctly.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-11-01 12:59:44 -07:00
parent 032a16eb43
commit 10c1ad245a
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10
2 changed files with 2 additions and 2 deletions

View File

@ -287,7 +287,7 @@ sub process_one_masq1( $$$$$$$$$$$$ )
validate_address $ipaddr, 0;
}
validate_portpair1( $proto, $rest ) if supplied $rest;
$addrlist .= "--to-source $addr ";
$addrlist .= "--to-source $ipaddr ";
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
} else {
my $ports = $addr;

View File

@ -5560,7 +5560,7 @@ sub process_snat1( $$$$$$$$$$$$ ) {
validate_address $ipaddr, 0;
}
validate_portpair1( $proto, $rest ) if supplied $rest;
$addrlist .= " --to-source $addr";
$addrlist .= " --to-source $ipaddr";
$exceptionrule = do_proto( $proto, '', '' ) if $addr =~ /:/;
} else {
my $ports = $addr;