mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-25 23:59:01 +01:00
Fix spurios add of alias in nat file
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@7862 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
ce2fc3ad11
commit
8889d86d75
@ -754,6 +754,9 @@ sub initialize_chain_table()
|
|||||||
sub finish_chain_section ($$) {
|
sub finish_chain_section ($$) {
|
||||||
my ($chainref, $state ) = @_;
|
my ($chainref, $state ) = @_;
|
||||||
my $chain = $chainref->{name};
|
my $chain = $chainref->{name};
|
||||||
|
my $savecomment = $comment;
|
||||||
|
|
||||||
|
$comment = '';
|
||||||
|
|
||||||
add_rule $chainref, "-m state --state $state -j ACCEPT" unless $config{FASTACCEPT};
|
add_rule $chainref, "-m state --state $state -j ACCEPT" unless $config{FASTACCEPT};
|
||||||
|
|
||||||
@ -777,6 +780,8 @@ sub finish_chain_section ($$) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$comment = $savecomment;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -372,14 +372,11 @@ sub do_one_nat( $$$$$ )
|
|||||||
fatal_error "Invalid nat file entry" unless defined $interface && defined $internal;
|
fatal_error "Invalid nat file entry" unless defined $interface && defined $internal;
|
||||||
|
|
||||||
if ( $add_ip_aliases ) {
|
if ( $add_ip_aliases ) {
|
||||||
if ( $interface =~ s/:$// ) {
|
if ( defined( $alias ) && $alias eq '' ) {
|
||||||
$add_ip_aliases = '';
|
$add_ip_aliases = '';
|
||||||
} else {
|
} else {
|
||||||
my ( $iface , undef ) = split /:/, $interface;
|
emit "del_ip_addr $external $interface" unless $config{RETAIN_ALIASES};
|
||||||
emit "del_ip_addr $external $iface" unless $config{RETAIN_ALIASES};
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$interface =~ s/:$//;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_nat_column 'ALL INTERFACES', \$allints;
|
validate_nat_column 'ALL INTERFACES', \$allints;
|
||||||
|
Loading…
Reference in New Issue
Block a user