forked from extern/shorewall_code
Swicth from postincrement to preincrement when bumping 'filterpri'.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
abbd1b2c35
commit
e14f5e5199
@ -983,7 +983,7 @@ sub validate_tc_device( ) {
|
|||||||
mtu => $mtu,
|
mtu => $mtu,
|
||||||
mpu => $mpu,
|
mpu => $mpu,
|
||||||
tsize => $tsize,
|
tsize => $tsize,
|
||||||
filterpri => 1,
|
filterpri => 0,
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
push @tcdevices, $device;
|
push @tcdevices, $device;
|
||||||
@ -1422,11 +1422,11 @@ sub process_tc_filter() {
|
|||||||
my ( $prio, $filterpri ) = ( undef, $devref->{filterpri} );
|
my ( $prio, $filterpri ) = ( undef, $devref->{filterpri} );
|
||||||
|
|
||||||
if ( $priority eq '-' ) {
|
if ( $priority eq '-' ) {
|
||||||
$prio = $filterpri++;
|
$prio = ++$filterpri;
|
||||||
fatal_error "Filter priority overflow" if $prio > 65535;
|
fatal_error "Filter priority overflow" if $prio > 65535;
|
||||||
} else {
|
} else {
|
||||||
$prio = validate_filter_priority( $priority, 'filter' );
|
$prio = validate_filter_priority( $priority, 'filter' );
|
||||||
$filterpri = $prio + 1 if $prio >= $filterpri;
|
$filterpri = $prio if $prio > $filterpri;
|
||||||
}
|
}
|
||||||
|
|
||||||
$devref->{filterpri} = $filterpri;
|
$devref->{filterpri} = $filterpri;
|
||||||
|
@ -205,22 +205,21 @@
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>For Shorewall versions prior to 4.5.8, all filters have
|
<para>For Shorewall versions prior to 4.5.8 - all filters have
|
||||||
priority 10.</para>
|
priority 10.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>For Shorewall 4.5.8 and later, the compiler maintains a
|
<para>For Shorewall 4.5.8 and later - for each device, the
|
||||||
<firstterm>high-water priority</firstterm> that has an initial
|
compiler maintains a <firstterm>high-water priority</firstterm>
|
||||||
value of 1. When a filter has no
|
with an initial value of 0. When a filter has no
|
||||||
<replaceable>priority</replaceable>, the high-water priority is
|
<replaceable>priority</replaceable>, the high-water priority is
|
||||||
assigned to the filter and the high-wanter priority is
|
incremented by 1 and assigned to the filter. When a
|
||||||
incremented by 1. When a <replaceable>priority</replaceable>
|
<replaceable>priority</replaceable> greater than the high-water
|
||||||
greater than or equal than the high-water priority is entered in
|
priority is entered in this column, the high-water priority is
|
||||||
this column, the high-water priority is set to the specified
|
set to the specified <replaceable>priority</replaceable>. An
|
||||||
<replaceable>priority</replaceable> plus 1. An attempt to assign
|
attempt to assign a priority value greater than 65535
|
||||||
a priority value greater than 65535 (explicitly or implicitly),
|
(explicitly or implicitly) raises an error.</para>
|
||||||
an error is raised.</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
@ -199,22 +199,21 @@
|
|||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>For Shorewall versions prior to 4.5.8, all filters have
|
<para>For Shorewall versions prior to 4.5.8 - all filters have
|
||||||
priority 11.</para>
|
priority 11.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>For Shorewall 4.5.8 and later, the compiler maintains a
|
<para>For Shorewall 4.5.8 and later - for each device, the
|
||||||
<firstterm>high-water priority</firstterm> that has an initial
|
compiler maintains a <firstterm>high-water priority</firstterm>
|
||||||
value of 1. When a filter has no
|
with an initial value of 0. When a filter has no
|
||||||
<replaceable>priority</replaceable>, the high-water priority is
|
<replaceable>priority</replaceable>, the high-water priority is
|
||||||
assigned to the filter and the high-wanter priority is
|
incremented by 1 and assigned to the filter. When a
|
||||||
incremented by 1. When a <replaceable>priority</replaceable>
|
<replaceable>priority</replaceable> greater than the high-water
|
||||||
greater than or equal than the high-water priority is entered in
|
priority is entered in this column, the high-water priority is
|
||||||
this column, the high-water priority is set to the specified
|
set to the specified <replaceable>priority</replaceable>. An
|
||||||
<replaceable>priority</replaceable> plus 1. An attempt to assign
|
attempt to assign a priority value greater than 65535
|
||||||
a priority value greater than 65535 (explicitly or implicitly),
|
(explicitly or implicitly) raises an error.</para>
|
||||||
an error is raised.</para>
|
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</itemizedlist>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user