diff --git a/New/Shorewall/Nat.pm b/New/Shorewall/Nat.pm index f5b2dc205..21fa23142 100644 --- a/New/Shorewall/Nat.pm +++ b/New/Shorewall/Nat.pm @@ -35,6 +35,9 @@ our @EXPORT = qw( setup_masq setup_nat ); our @EXPORT_OK = (); our @VERSION = 1.00; +my @addresses_to_add; +my %addresses_to_add; + # # Handle IPSEC Options in a masq record # @@ -130,14 +133,14 @@ sub setup_one_masq($$$$$$) # Parse the remaining part of the INTERFACE column # if ( $fullinterface =~ /^([^:]+)::([^:]*)$/ ) { - $add_snat_aliases = undef; + $add_snat_aliases = 0; $destnets = $2; $fullinterface = $1; } elsif ( $fullinterface =~ /^([^:]+:[^:]+):([^:]+)$/ ) { $destnets = $2; $fullinterface = $1; } elsif ( $fullinterface =~ /^([^:]+):$/ ) { - $add_snat_aliases = undef; + $add_snat_aliases = 0; $fullinterface = $1; } elsif ( $fullinterface =~ /^([^:]+):([^:]*)$/ ) { my ( $one, $two ) = ( $1, $2 ); @@ -205,15 +208,17 @@ sub setup_one_masq($$$$$$) $target .= $addrlist; } + } else { + $add_snat_aliases = 0; } - # # And Generate the Rule(s) # expand_rule $chainref , POSTROUTE_RESTRICT , $rule, $networks, $destnets, '', $target, '', '' , ''; - progress_message " Masq record \"$line\" $done"; + progress_message " Masq record \"$line\" $done"; + } # diff --git a/New/compiler.pl b/New/compiler.pl index 9c5a3daa5..371f2e40f 100755 --- a/New/compiler.pl +++ b/New/compiler.pl @@ -509,21 +509,15 @@ sub generate_script_2 () { sub generate_script_3() { emit 'cat > ${VARDIR}/proxyarp << __EOF__'; - dump_proxy_arp; - emit_unindented '__EOF__'; emit 'cat > ${VARDIR}/chains << __EOF__'; - dump_rule_chains; - emit_unindented '__EOF__'; emit 'cat > ${VARDIR}/zones << __EOF__'; - dump_zone_contents; - emit_unindented '__EOF__'; pop_indent;