Correct port pair handling in the snat ADDRESS column.

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2013-02-25 15:31:36 -08:00
parent 6b825abeb4
commit 7006c62892
2 changed files with 5 additions and 4 deletions

View File

@ -283,13 +283,14 @@ sub process_one_masq1( $$$$$$$$$$ )
validate_address $addr, 0;
}
$addrlist .= "--to-source $addr ";
if ( supplied $ports ) {
validate_portpair( $proto, $ports );
validate_portpair1( $proto, $ports );
$exceptionrule = do_proto( $proto, '', '' );
$addrlist .= "--toports $ports ";
$addr = "[$addr]:$ports";
}
$addrlist .= "--to-source $addr ";
} else {
if ( $addr =~ /^(.+)-(.+)$/ ) {
validate_range( $1, $2 );

View File

@ -140,7 +140,7 @@
from the range will be random.</para>
<para>Example:
[2001:470:a:227::2]-[2001:470:a:227::10]::1000-1010</para>
[2001:470:a:227::2]-[2001:470:a:227::10]:1000-1010</para>
<para>You may follow the port range (or <emphasis
role="bold">:random</emphasis>) with <emphasis