mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-23 22:58:52 +01:00
Add 'logname' member to chain table entries.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
0cb4a5c202
commit
4dfc6d90b9
@ -2585,13 +2585,14 @@ sub reserved_name( $ ) {
|
|||||||
#
|
#
|
||||||
# Create a new chain and return a reference to it.
|
# Create a new chain and return a reference to it.
|
||||||
#
|
#
|
||||||
sub new_chain($$)
|
sub new_chain($$;$)
|
||||||
{
|
{
|
||||||
my ($table, $chain) = @_;
|
my ($table, $chain, $logchain) = @_;
|
||||||
|
|
||||||
assert( $chain_table{$table} && ! ( $chain_table{$table}{$chain} || $builtin_target{ $chain } ) );
|
assert( $chain_table{$table} && ! ( $chain_table{$table}{$chain} || $builtin_target{ $chain } ) );
|
||||||
|
|
||||||
my $chainref = { name => $chain,
|
my $chainref = { name => $chain,
|
||||||
|
logname => $logchain || $chain,
|
||||||
rules => [],
|
rules => [],
|
||||||
table => $table,
|
table => $table,
|
||||||
loglevel => '',
|
loglevel => '',
|
||||||
@ -2612,7 +2613,7 @@ sub new_chain($$)
|
|||||||
#
|
#
|
||||||
# Find a chain
|
# Find a chain
|
||||||
#
|
#
|
||||||
sub find_chain($$) {
|
sub find_chain($$;$) {
|
||||||
my ($table, $chain) = @_;
|
my ($table, $chain) = @_;
|
||||||
|
|
||||||
assert( $table && $chain && $chain_table{$table} );
|
assert( $table && $chain && $chain_table{$table} );
|
||||||
@ -2623,7 +2624,7 @@ sub find_chain($$) {
|
|||||||
#
|
#
|
||||||
# Create a chain if it doesn't exist already
|
# Create a chain if it doesn't exist already
|
||||||
#
|
#
|
||||||
sub ensure_chain($$)
|
sub ensure_chain($$;$)
|
||||||
{
|
{
|
||||||
&find_chain( @_ ) || &new_chain( @_ );
|
&find_chain( @_ ) || &new_chain( @_ );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user