mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-14 03:34:31 +01:00
Always place 'nfacct' last
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d3e9a2f7e8
commit
9c010691a3
@ -610,7 +610,8 @@ use constant { UNIQUE => 1,
|
||||
EXCLUSIVE => 4,
|
||||
MATCH => 8,
|
||||
CONTROL => 16,
|
||||
COMPLEX => 32
|
||||
COMPLEX => 32,
|
||||
LAST => 64,
|
||||
};
|
||||
|
||||
our %opttype = ( rule => CONTROL,
|
||||
@ -646,6 +647,8 @@ our %opttype = ( rule => CONTROL,
|
||||
jump => TARGET,
|
||||
target => TARGET,
|
||||
targetopts => TARGET,
|
||||
|
||||
nfacct => LAST,
|
||||
);
|
||||
|
||||
our %aliases = ( protocol => 'p',
|
||||
@ -1014,6 +1017,10 @@ sub format_rule( $$;$ ) {
|
||||
$rule .= format_option( $_, pop_match( $ruleref, $_ ) );
|
||||
}
|
||||
|
||||
for ( grep( ( $opttype{$_} || 0 ) == LAST , @{$ruleref->{matches}} ) ) {
|
||||
$rule .= format_option( $_, pop_match( $ruleref, $_ ) );
|
||||
}
|
||||
|
||||
if ( $ruleref->{target} ) {
|
||||
$rule .= join( ' ', " -$ruleref->{jump}", $ruleref->{target} );
|
||||
$rule .= join( '', ' ', $ruleref->{targetopts} ) if $ruleref->{targetopts};
|
||||
|
Loading…
Reference in New Issue
Block a user