mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-14 03:34:31 +01:00
Correct handling of family switch in tcfilters processing
This commit is contained in:
parent
e052951890
commit
63e5f6aff9
@ -1792,7 +1792,7 @@ sub embedded_perl( $ ) {
|
||||
# - Remove trailing comments.
|
||||
# - Handle Line Continuation
|
||||
# - Handle embedded SHELL and PERL scripts
|
||||
# - Expand shell variables from $ENV.
|
||||
# - Expand shell variables from %params and %ENV.
|
||||
# - Handle INCLUDE <filename>
|
||||
#
|
||||
|
||||
@ -1864,6 +1864,9 @@ sub read_a_line(;$) {
|
||||
while ( $currentline =~ m( ^(.*?) \$({)? ([a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
|
||||
|
||||
unless ( exists $params{$3} ) {
|
||||
#
|
||||
# Given the way that getparams works, this should never help but better safe than sorry
|
||||
#
|
||||
$params{$3} = $ENV{$3} if exists $ENV{$3};
|
||||
}
|
||||
|
||||
|
@ -1187,9 +1187,9 @@ sub process_tcfilters() {
|
||||
|
||||
while ( read_a_line ) {
|
||||
if ( $currentline =~ /^\s*IPV4\s*$/ ) {
|
||||
$family = F_IPV4;
|
||||
Shorewall::IPAddrs::initialize( $family = F_IPV4 ) unless $family == F_IPV4;
|
||||
} elsif ( $currentline =~ /^\s*IPV6\s*$/ ) {
|
||||
$family = F_IPV6;
|
||||
Shorewall::IPAddrs::initialize( $family = F_IPV6 ) unless $family == F_IPV6;
|
||||
} elsif ( $currentline =~ /^\s*ALL\s*$/ ) {
|
||||
$family = 0;
|
||||
} elsif ( $family ) {
|
||||
@ -1198,15 +1198,15 @@ sub process_tcfilters() {
|
||||
push @family, $family;
|
||||
|
||||
for ( F_IPV4, F_IPV6 ) {
|
||||
$family = $_;
|
||||
Shorewall::IPAddrs::initialize( $family = $_ );
|
||||
process_tc_filter;
|
||||
}
|
||||
|
||||
$family = pop @family;
|
||||
Shorewall::IPAddrs::initialize( $family = pop @family );
|
||||
}
|
||||
}
|
||||
|
||||
$family = pop @family;
|
||||
Shorewall::IPAddrs::initialize( $family = pop @family );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user