Fix a couple of bugs in masq source network detection

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5570 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2007-03-18 21:37:32 +00:00
parent 0b81633de5
commit 092083379c
2 changed files with 2 additions and 11 deletions

View File

@ -1025,10 +1025,10 @@ sub expand_rule( $$$$$$$$$$ )
if ( $detectcount ) { if ( $detectcount ) {
my $newchainref = new_anon_chain( $chainref ); my $newchainref = new_anon_chain( $chainref );
add_command $chainref, qq(emit "-A $chain $rule -j $newchainref->{name}"); add_command $chainref, (' ' x $detectcount) . qq(emit "-A $chain $rule -j $newchainref->{name}");
while ( $detectcount-- ) { while ( $detectcount-- ) {
add_command( $chainref, (' ' x $detectcount) . 'fi' ); add_command( $chainref, (' ' x $detectcount) . 'done' );
} }
$chainref = $newchainref; $chainref = $newchainref;

View File

@ -164,15 +164,6 @@ sub setup_one_masq($$$$$$)
# Handle Protocol and Ports # Handle Protocol and Ports
# #
$rule .= do_proto $proto, $ports, ''; $rule .= do_proto $proto, $ports, '';
#
# Do we need to detect the source addresses at run-time?
#
my $detectinterface = '';
unless ( $networks =~ /.*\..*\./ ) {
$detectinterface = $networks;
$networks = '';
}
# #
# Parse the ADDRESSES column # Parse the ADDRESSES column