mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-11 08:08:12 +01:00
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
|
||||
#
|
||||
@ -3019,6 +3002,12 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
||||
|
||||
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
|
||||
#
|
||||
my @savecolumns = @columns;
|
||||
|
Loading…
Reference in New Issue
Block a user