Optimize chain resolution in process_mangle_rule1()

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2016-03-10 15:26:52 -08:00
parent 147c7e284f
commit 6779c8307f

View File

@ -4467,9 +4467,12 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
# Subroutine to resolve which chain to use
#
my $resolve_chain = sub() {
$chain ||= $designator;
$chain ||= $commandref->{defaultchain};
$chain ||= $default_chain;
unless ( $chain ) {
$chain ||= $designator;
$chain ||= $commandref->{defaultchain};
$chain ||= $default_chain;
}
$chainref = ensure_chain( 'mangle', $chainnames{$chain} );
};
#