mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-06 04:49:32 +01:00
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:
parent
0b81633de5
commit
092083379c
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user