diff --git a/New/Shorewall/Chains.pm b/New/Shorewall/Chains.pm index 989f3b208..6071b1566 100644 --- a/New/Shorewall/Chains.pm +++ b/New/Shorewall/Chains.pm @@ -1025,10 +1025,10 @@ sub expand_rule( $$$$$$$$$$ ) if ( $detectcount ) { 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-- ) { - add_command( $chainref, (' ' x $detectcount) . 'fi' ); + add_command( $chainref, (' ' x $detectcount) . 'done' ); } $chainref = $newchainref; diff --git a/New/Shorewall/Nat.pm b/New/Shorewall/Nat.pm index 5fe1a5f0f..aba4d8956 100644 --- a/New/Shorewall/Nat.pm +++ b/New/Shorewall/Nat.pm @@ -164,15 +164,6 @@ sub setup_one_masq($$$$$$) # Handle Protocol and 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