mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-18 10:40:54 +01:00
Allow INLINE() in the accounting file to accept '+' in inline matches
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
0eb0bace9a
commit
8e5f67797a
@ -3,7 +3,7 @@
|
|||||||
#
|
#
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||||
#
|
#
|
||||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||||
#
|
#
|
||||||
# Complete documentation is available at http://shorewall.net
|
# Complete documentation is available at http://shorewall.net
|
||||||
#
|
#
|
||||||
@ -201,6 +201,13 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
|
|||||||
my $prerule = '';
|
my $prerule = '';
|
||||||
my $rule2 = 0;
|
my $rule2 = 0;
|
||||||
my $jump = 0;
|
my $jump = 0;
|
||||||
|
my $raw_matches = get_inline_matches(1);
|
||||||
|
|
||||||
|
if ( $raw_matches =~ s/^\s*+// ) {
|
||||||
|
$prerule = $raw_matches;
|
||||||
|
} else {
|
||||||
|
$rule .= $raw_matches;
|
||||||
|
}
|
||||||
|
|
||||||
unless ( $action eq 'COUNT' ) {
|
unless ( $action eq 'COUNT' ) {
|
||||||
if ( $action eq 'DONE' ) {
|
if ( $action eq 'DONE' ) {
|
||||||
@ -242,9 +249,7 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
|
|||||||
$rule .= do_nfacct( $_ );
|
$rule .= do_nfacct( $_ );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} elsif ( $action eq 'INLINE' ) {
|
} elsif ( $action ne 'INLINE' ) {
|
||||||
$rule .= get_inline_matches(1);
|
|
||||||
} else {
|
|
||||||
( $action, my $cmd ) = split /:/, $action;
|
( $action, my $cmd ) = split /:/, $action;
|
||||||
|
|
||||||
if ( $cmd ) {
|
if ( $cmd ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user