mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 11:20:53 +01:00
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:
parent
dd9323c2c3
commit
2eb5b8371d
@ -35,6 +35,9 @@ our @EXPORT = qw( setup_masq setup_nat );
|
|||||||
our @EXPORT_OK = ();
|
our @EXPORT_OK = ();
|
||||||
our @VERSION = 1.00;
|
our @VERSION = 1.00;
|
||||||
|
|
||||||
|
my @addresses_to_add;
|
||||||
|
my %addresses_to_add;
|
||||||
|
|
||||||
#
|
#
|
||||||
# Handle IPSEC Options in a masq record
|
# Handle IPSEC Options in a masq record
|
||||||
#
|
#
|
||||||
@ -130,14 +133,14 @@ sub setup_one_masq($$$$$$)
|
|||||||
# Parse the remaining part of the INTERFACE column
|
# Parse the remaining part of the INTERFACE column
|
||||||
#
|
#
|
||||||
if ( $fullinterface =~ /^([^:]+)::([^:]*)$/ ) {
|
if ( $fullinterface =~ /^([^:]+)::([^:]*)$/ ) {
|
||||||
$add_snat_aliases = undef;
|
$add_snat_aliases = 0;
|
||||||
$destnets = $2;
|
$destnets = $2;
|
||||||
$fullinterface = $1;
|
$fullinterface = $1;
|
||||||
} elsif ( $fullinterface =~ /^([^:]+:[^:]+):([^:]+)$/ ) {
|
} elsif ( $fullinterface =~ /^([^:]+:[^:]+):([^:]+)$/ ) {
|
||||||
$destnets = $2;
|
$destnets = $2;
|
||||||
$fullinterface = $1;
|
$fullinterface = $1;
|
||||||
} elsif ( $fullinterface =~ /^([^:]+):$/ ) {
|
} elsif ( $fullinterface =~ /^([^:]+):$/ ) {
|
||||||
$add_snat_aliases = undef;
|
$add_snat_aliases = 0;
|
||||||
$fullinterface = $1;
|
$fullinterface = $1;
|
||||||
} elsif ( $fullinterface =~ /^([^:]+):([^:]*)$/ ) {
|
} elsif ( $fullinterface =~ /^([^:]+):([^:]*)$/ ) {
|
||||||
my ( $one, $two ) = ( $1, $2 );
|
my ( $one, $two ) = ( $1, $2 );
|
||||||
@ -205,13 +208,15 @@ sub setup_one_masq($$$$$$)
|
|||||||
|
|
||||||
$target .= $addrlist;
|
$target .= $addrlist;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$add_snat_aliases = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# And Generate the Rule(s)
|
# And Generate the Rule(s)
|
||||||
#
|
#
|
||||||
expand_rule $chainref , POSTROUTE_RESTRICT , $rule, $networks, $destnets, '', $target, '', '' , '';
|
expand_rule $chainref , POSTROUTE_RESTRICT , $rule, $networks, $destnets, '', $target, '', '' , '';
|
||||||
|
|
||||||
|
|
||||||
progress_message " Masq record \"$line\" $done";
|
progress_message " Masq record \"$line\" $done";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -509,21 +509,15 @@ sub generate_script_2 () {
|
|||||||
sub generate_script_3() {
|
sub generate_script_3() {
|
||||||
|
|
||||||
emit 'cat > ${VARDIR}/proxyarp << __EOF__';
|
emit 'cat > ${VARDIR}/proxyarp << __EOF__';
|
||||||
|
|
||||||
dump_proxy_arp;
|
dump_proxy_arp;
|
||||||
|
|
||||||
emit_unindented '__EOF__';
|
emit_unindented '__EOF__';
|
||||||
|
|
||||||
emit 'cat > ${VARDIR}/chains << __EOF__';
|
emit 'cat > ${VARDIR}/chains << __EOF__';
|
||||||
|
|
||||||
dump_rule_chains;
|
dump_rule_chains;
|
||||||
|
|
||||||
emit_unindented '__EOF__';
|
emit_unindented '__EOF__';
|
||||||
|
|
||||||
emit 'cat > ${VARDIR}/zones << __EOF__';
|
emit 'cat > ${VARDIR}/zones << __EOF__';
|
||||||
|
|
||||||
dump_zone_contents;
|
dump_zone_contents;
|
||||||
|
|
||||||
emit_unindented '__EOF__';
|
emit_unindented '__EOF__';
|
||||||
|
|
||||||
pop_indent;
|
pop_indent;
|
||||||
|
Loading…
Reference in New Issue
Block a user