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
This commit is contained in:
teastep 2007-03-21 23:14:33 +00:00
parent dd9323c2c3
commit 2eb5b8371d
2 changed files with 9 additions and 10 deletions

View File

@ -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";
}
#

View File

@ -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;