From 2eb5b8371d64feb6b0f9bdc2a8cd6286403f0541 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 21 Mar 2007 23:14:33 +0000 Subject: [PATCH] Preliminary work for adding IP addresses to interfaces git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5617 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Nat.pm | 13 +++++++++---- New/compiler.pl | 6 ------ 2 files changed, 9 insertions(+), 10 deletions(-) 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;