forked from extern/shorewall_code
Move and simplify handling of nat columns
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
e6a2ba78a4
commit
4f79d2e82b
@ -2837,23 +2837,6 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $actiontype & ACTION ) {
|
|
||||||
my $dst = $dest;
|
|
||||||
|
|
||||||
if ( $dst eq '-' ) {
|
|
||||||
$dst = $nat_columns{dest};
|
|
||||||
} elsif ( ! $inchain ) {
|
|
||||||
#
|
|
||||||
# Remove zone from destination
|
|
||||||
#
|
|
||||||
$dst =~ s/.*://;
|
|
||||||
}
|
|
||||||
|
|
||||||
@nat_columns{'dest', 'proto', 'ports' } = ( $dst,
|
|
||||||
$proto eq '-' ? $nat_columns{proto} : $proto,
|
|
||||||
$ports eq '-' ? $nat_columns{ports} : $ports );
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Isolate and validate source and destination zones
|
# Isolate and validate source and destination zones
|
||||||
#
|
#
|
||||||
@ -3019,6 +3002,12 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
|||||||
|
|
||||||
if ( $actiontype & ACTION ) {
|
if ( $actiontype & ACTION ) {
|
||||||
#
|
#
|
||||||
|
# Save NAT-oriented column contents
|
||||||
|
#
|
||||||
|
@nat_columns{'dest', 'proto', 'ports' } = ( $dest,
|
||||||
|
$proto eq '-' ? $nat_columns{proto} : $proto,
|
||||||
|
$ports eq '-' ? $nat_columns{ports} : $ports );
|
||||||
|
#
|
||||||
# Push the current column array onto the column stack
|
# Push the current column array onto the column stack
|
||||||
#
|
#
|
||||||
my @savecolumns = @columns;
|
my @savecolumns = @columns;
|
||||||
|
Loading…
Reference in New Issue
Block a user