forked from extern/shorewall_code
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,
|
EXCLUSIVE => 4,
|
||||||
MATCH => 8,
|
MATCH => 8,
|
||||||
CONTROL => 16,
|
CONTROL => 16,
|
||||||
COMPLEX => 32
|
COMPLEX => 32,
|
||||||
|
LAST => 64,
|
||||||
};
|
};
|
||||||
|
|
||||||
our %opttype = ( rule => CONTROL,
|
our %opttype = ( rule => CONTROL,
|
||||||
@ -646,6 +647,8 @@ our %opttype = ( rule => CONTROL,
|
|||||||
jump => TARGET,
|
jump => TARGET,
|
||||||
target => TARGET,
|
target => TARGET,
|
||||||
targetopts => TARGET,
|
targetopts => TARGET,
|
||||||
|
|
||||||
|
nfacct => LAST,
|
||||||
);
|
);
|
||||||
|
|
||||||
our %aliases = ( protocol => 'p',
|
our %aliases = ( protocol => 'p',
|
||||||
@ -1014,6 +1017,10 @@ sub format_rule( $$;$ ) {
|
|||||||
$rule .= format_option( $_, pop_match( $ruleref, $_ ) );
|
$rule .= format_option( $_, pop_match( $ruleref, $_ ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for ( grep( ( $opttype{$_} || 0 ) == LAST , @{$ruleref->{matches}} ) ) {
|
||||||
|
$rule .= format_option( $_, pop_match( $ruleref, $_ ) );
|
||||||
|
}
|
||||||
|
|
||||||
if ( $ruleref->{target} ) {
|
if ( $ruleref->{target} ) {
|
||||||
$rule .= join( ' ', " -$ruleref->{jump}", $ruleref->{target} );
|
$rule .= join( ' ', " -$ruleref->{jump}", $ruleref->{target} );
|
||||||
$rule .= join( '', ' ', $ruleref->{targetopts} ) if $ruleref->{targetopts};
|
$rule .= join( '', ' ', $ruleref->{targetopts} ) if $ruleref->{targetopts};
|
||||||
|
Loading…
Reference in New Issue
Block a user