mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 17:58:07 +02:00
Finish Mr-4's NFACCT patch
- Correct indentation - Remove '$type' argument to split_nfacct_list - Update manpages. Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
68c7782e7d
commit
f543c3bd1e
@ -138,10 +138,10 @@ sub process_section ($) {
|
||||
$asection = $newsect;
|
||||
}
|
||||
|
||||
sub split_nfacct_list( $$;$ ) {
|
||||
my ($list, $type, $origlist ) = @_;
|
||||
sub split_nfacct_list( $;$ ) {
|
||||
my ($list, $origlist ) = @_;
|
||||
|
||||
fatal_error( "Invalid $type list (" . ( $origlist ? $origlist : $list ) . ')' ) if $list =~ /^,|,$|,,$/;
|
||||
fatal_error( "Invalid nfacct list (" . ( $origlist ? $origlist : $list ) . ')' ) if $list =~ /^,|,$|,,$/;
|
||||
|
||||
split /,/, $list;
|
||||
}
|
||||
@ -234,7 +234,7 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
|
||||
} elsif ( $action =~ /^NFACCT\(([\w,!]+)\)$/ ) {
|
||||
require_capability 'NFACCT_MATCH', 'The NFACCT action', 's';
|
||||
$target = '';
|
||||
my @objects = split_nfacct_list $1, 'nfacct';
|
||||
my @objects = split_nfacct_list $1;
|
||||
for ( @objects ) {
|
||||
if ( $_ =~ /^([\w]+)(!)?$/ ) {
|
||||
if ( $2 ) {
|
||||
|
@ -309,7 +309,7 @@
|
||||
|
||||
<varlistentry>
|
||||
<term><emphasis
|
||||
role="bold">NFACCT</emphasis>(<replaceable>object</replaceable>[,...])[!]</term>
|
||||
role="bold">NFACCT</emphasis>({<replaceable>object</replaceable>[!]}[,...])</term>
|
||||
|
||||
<listitem>
|
||||
<para>Added in Shorewall 4.5.7. Provides a form of accounting
|
||||
@ -327,12 +327,14 @@
|
||||
Beginning with Shorewall 4.5.16, an arbitrary number of
|
||||
objects may be given.</para>
|
||||
|
||||
<para>With Shorewall 4.5.16 or later, <emphasis
|
||||
role="bold">!</emphasis> may be specified to indicate that the
|
||||
nfacct <replaceable>object</replaceable>(s) will be
|
||||
incremented unconditionally. When omitted, the
|
||||
<replaceable>object</replaceable>(s) will be incremented only
|
||||
if all of the matches in the rule succeed.</para>
|
||||
<para>With Shorewall 4.5.16 or later, an nfacct
|
||||
<replaceable>object</replaceable> in the list may optionally
|
||||
be followed by <emphasis role="bold">!</emphasis> to indicate
|
||||
that the nfacct <replaceable>object</replaceable> will be
|
||||
incremented unconditionally for each packet. When <emphasis
|
||||
role="bold">!</emphasis> is omitted, the
|
||||
<replaceable>object</replaceable> will be incremented only if
|
||||
all of the matches in the rule succeed.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -251,7 +251,7 @@
|
||||
|
||||
<varlistentry>
|
||||
<term><emphasis
|
||||
role="bold">NFACCT</emphasis>(<replaceable>object</replaceable>[,...])[!]</term>
|
||||
role="bold">NFACCT</emphasis>({<replaceable>object</replaceable>[!]}[,...])</term>
|
||||
|
||||
<listitem>
|
||||
<para>Added in Shorewall 4.5.7. Provides a form of accounting
|
||||
@ -269,12 +269,14 @@
|
||||
Beginning with Shorewall 4.5.16, an arbitrary number of
|
||||
objects may be given.</para>
|
||||
|
||||
<para>With Shorewall 4.5.16 or later, <emphasis
|
||||
role="bold">!</emphasis> may be specified to indicate that the
|
||||
nfacct <replaceable>object</replaceable>(s) will be
|
||||
incremented unconditionally. When omitted, the
|
||||
<replaceable>object</replaceable>(s) will be incremented only
|
||||
if all of the matches in the rule succeed.</para>
|
||||
<para>With Shorewall 4.5.16 or later, an nfacct
|
||||
<replaceable>object</replaceable> in the list may optionally
|
||||
be followed by <emphasis role="bold">!</emphasis> to indicate
|
||||
that the nfacct <replaceable>object</replaceable> will be
|
||||
incremented unconditionally for each packet. When <emphasis
|
||||
role="bold">!</emphasis> is omitted, the
|
||||
<replaceable>object</replaceable> will be incremented only if
|
||||
all of the matches in the rule succeed.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user