mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-15 04:04:10 +01:00
Fix second bug regarding ADD_IP_ALIASES=Yes
Signed-off-by: Tom Eastep <teastep@shorewall.net> git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9823 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
eb533d8b00
commit
b6053d8577
@ -388,11 +388,7 @@ sub do_one_nat( $$$$$ )
|
||||
fatal_error "Invalid nat file entry" unless defined $interface && defined $internal;
|
||||
|
||||
if ( $add_ip_aliases ) {
|
||||
if ( defined( $alias ) && $alias eq '' ) {
|
||||
$add_ip_aliases = '';
|
||||
} else {
|
||||
emit "del_ip_addr $external $interface" unless $config{RETAIN_ALIASES};
|
||||
}
|
||||
$add_ip_aliases = '' if defined( $alias ) && $alias eq '';
|
||||
}
|
||||
|
||||
validate_nat_column 'ALL INTERFACES', \$allints;
|
||||
@ -494,11 +490,17 @@ sub setup_netmap() {
|
||||
sub add_addresses () {
|
||||
if ( @addresses_to_add ) {
|
||||
my $arg = '';
|
||||
my $addresses = 0;
|
||||
|
||||
while ( @addresses_to_add ) {
|
||||
my $addr = shift @addresses_to_add;
|
||||
my $interface = shift @addresses_to_add;
|
||||
$arg = "$arg $addr $interface";
|
||||
unless ( $config{RETAIN_ALIASES} ) {
|
||||
emit '' unless $addresses++;
|
||||
$interface =~ s/:.*//;
|
||||
emit "del_ip_addr $addr $interface";
|
||||
}
|
||||
}
|
||||
|
||||
emit "\nadd_ip_aliases $arg";
|
||||
|
Loading…
Reference in New Issue
Block a user