forked from extern/shorewall_code
Revert "Implement the 'terminating' action option"
This reverts commit 6851744cb7
.
This commit is contained in:
parent
4495ed687b
commit
1f5439257a
@ -73,7 +73,6 @@ our @EXPORT = ( qw(
|
|||||||
allow_optimize
|
allow_optimize
|
||||||
allow_delete
|
allow_delete
|
||||||
allow_move
|
allow_move
|
||||||
make_terminating
|
|
||||||
set_optflags
|
set_optflags
|
||||||
reset_optflags
|
reset_optflags
|
||||||
has_return
|
has_return
|
||||||
@ -105,6 +104,7 @@ our @EXPORT = ( qw(
|
|||||||
AUDIT
|
AUDIT
|
||||||
HELPER
|
HELPER
|
||||||
INLINE
|
INLINE
|
||||||
|
TERMINATING
|
||||||
STATEMATCH
|
STATEMATCH
|
||||||
USERBUILTIN
|
USERBUILTIN
|
||||||
INLINERULE
|
INLINERULE
|
||||||
@ -793,13 +793,6 @@ sub decr_cmd_level( $ ) {
|
|||||||
assert( --$_[0]->{cmdlevel} >= 0, $_[0] );
|
assert( --$_[0]->{cmdlevel} >= 0, $_[0] );
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
|
||||||
# Mark an action as terminating
|
|
||||||
#
|
|
||||||
sub make_terminating( $ ) {
|
|
||||||
$terminating{$_[0]} = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Transform the passed iptables rule into an internal-form hash reference.
|
# Transform the passed iptables rule into an internal-form hash reference.
|
||||||
# Most of the compiler has been converted to use the new form natively.
|
# Most of the compiler has been converted to use the new form natively.
|
||||||
|
@ -1748,15 +1748,14 @@ sub process_actions() {
|
|||||||
undef, #Columns
|
undef, #Columns
|
||||||
1 ); #Allow inline matches
|
1 ); #Allow inline matches
|
||||||
|
|
||||||
my $type = ( $action eq $config{REJECT_ACTION} ? INLINE : ACTION );
|
my $type = ( $action eq $config{REJECT_ACTION} ? INLINE : ACTION );
|
||||||
my $noinline = 0;
|
my $noinline = 0;
|
||||||
my $nolog = ( $type == INLINE ) || 0;
|
my $nolog = ( $type == INLINE ) || 0;
|
||||||
my $builtin = 0;
|
my $builtin = 0;
|
||||||
my $raw = 0;
|
my $raw = 0;
|
||||||
my $mangle = 0;
|
my $mangle = 0;
|
||||||
my $filter = 0;
|
my $filter = 0;
|
||||||
my $nat = 0;
|
my $nat = 0;
|
||||||
my $terminating = 0;
|
|
||||||
|
|
||||||
if ( $action =~ /:/ ) {
|
if ( $action =~ /:/ ) {
|
||||||
warning_message 'Default Actions are now specified in /etc/shorewall/shorewall.conf';
|
warning_message 'Default Actions are now specified in /etc/shorewall/shorewall.conf';
|
||||||
@ -1775,8 +1774,6 @@ sub process_actions() {
|
|||||||
$nolog = 1;
|
$nolog = 1;
|
||||||
} elsif ( $_ eq 'builtin' ) {
|
} elsif ( $_ eq 'builtin' ) {
|
||||||
$builtin = 1;
|
$builtin = 1;
|
||||||
} elsif ( $_ eq 'terminating' ) {
|
|
||||||
$terminating = 1;
|
|
||||||
} elsif ( $_ eq 'mangle' ) {
|
} elsif ( $_ eq 'mangle' ) {
|
||||||
$mangle = 1;
|
$mangle = 1;
|
||||||
} elsif ( $_ eq 'raw' ) {
|
} elsif ( $_ eq 'raw' ) {
|
||||||
@ -1825,8 +1822,6 @@ sub process_actions() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$targets{$action} = $actiontype;
|
$targets{$action} = $actiontype;
|
||||||
|
|
||||||
make_terminating( $action ) if $terminating;
|
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Table names are only allowed for builtin actions" if $mangle || $raw || $nat || $filter;
|
fatal_error "Table names are only allowed for builtin actions" if $mangle || $raw || $nat || $filter;
|
||||||
new_action $action, $type, $noinline, $nolog;
|
new_action $action, $type, $noinline, $nolog;
|
||||||
|
@ -71,17 +71,10 @@
|
|||||||
role="bold">raw</emphasis>. If no table name(s) are given,
|
role="bold">raw</emphasis>. If no table name(s) are given,
|
||||||
then <emphasis role="bold">filter</emphasis> is assumed. The
|
then <emphasis role="bold">filter</emphasis> is assumed. The
|
||||||
table names follow <emphasis role="bold">builtin</emphasis>
|
table names follow <emphasis role="bold">builtin</emphasis>
|
||||||
and are separated by commas; for example, "FOOBAR
|
and are separated by commas; for example,
|
||||||
builtin,filter,mangle" would specify FOOBAR as a builtin
|
"FOOBAR,filter,mangle" would specify FOOBAR as a builtin
|
||||||
target that can be used in the filter and mangle
|
target that can be used in the filter and mangle
|
||||||
tables.</para>
|
tables.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.6.4, you may specify the
|
|
||||||
<emphasis role="bold">terminating</emphasis> option with
|
|
||||||
<emphasis role="bold">builtin</emphasis> to indicate to the
|
|
||||||
Shorewall optimizer that the action is terminating (the
|
|
||||||
current packet will not be passed to the next rule in the
|
|
||||||
chain).</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
@ -71,18 +71,10 @@
|
|||||||
role="bold">mangle</emphasis> and <emphasis
|
role="bold">mangle</emphasis> and <emphasis
|
||||||
role="bold">raw</emphasis>. If no table name(s) are given,
|
role="bold">raw</emphasis>. If no table name(s) are given,
|
||||||
then <emphasis role="bold">filter</emphasis> is assumed. The
|
then <emphasis role="bold">filter</emphasis> is assumed. The
|
||||||
table names follow <emphasis role="bold">builtin</emphasis>
|
table names follow builtin and are separated by commas; for
|
||||||
and are separated by commas; for example, "FOOBAR
|
example, "FOOBAR,filter,mangle" would specify FOOBAR as a
|
||||||
builtin,filter,mangle" would specify FOOBAR as a builtin
|
builtin target that can be used in the filter and mangle
|
||||||
target that can be used in the filter and mangle
|
|
||||||
tables.</para>
|
tables.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.6.4, you may specify the
|
|
||||||
<emphasis role="bold">terminating</emphasis> option with
|
|
||||||
<emphasis role="bold">builtin</emphasis> to indicate to the
|
|
||||||
Shorewall optimizer that the action is terminating (the
|
|
||||||
current packet will not be passed to the next rule in the
|
|
||||||
chain).</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user