Revert "Match section rules to the number of mark rules"

This reverts commit 1699d8e941.
This commit is contained in:
Tom Eastep 2009-11-28 07:19:41 -08:00
parent 0b1621027b
commit f21c71d7a6
2 changed files with 5 additions and 13 deletions

View File

@ -1148,17 +1148,7 @@ sub finish_chain_section ($$) {
$comment = '';
unless ( $config{FASTACCEPT} ) {
if ( $chainref->{marked} ) {
if ( $chainref->{marked} == @{$chainref->{rules}} ) {
insert_rule( $chainref, 0, "-m state --state $state -j ACCEPT" );
} else {
add_rule $chainref, "-m state --state $state -j ACCEPT";
}
} else {
add_rule $chainref, "-m state --state $state -j ACCEPT";
}
}
add_rule $chainref, "-m state --state $state -j ACCEPT" unless $config{FASTACCEPT};
if ($sections{NEW} ) {
if ( $chainref->{is_policy} ) {

View File

@ -136,8 +136,10 @@ sub add_or_modify_policy_chain( $$ ) {
my $mark = defined_zone( $zone )->{mark};
my $mark1 = defined_zone( $zone1 )->{mark} << VIRTUAL_BITS;
$chainref->{marked} = 1, add_rule $chainref, '-j MARK --or-mark ' . in_hex($mark) if $mark && $zone1 eq firewall_zone;
$chainref->{marked}++ , add_rule $chainref, '-j MARK --or-mark ' . in_hex($mark1) if $mark1;
add_rule $chainref, '-j MARK --or-mark ' . in_hex($mark) if $mark && $zone1 eq firewall_zone;
add_rule $chainref, '-j MARK --or-mark ' . in_hex($mark1) if $mark1;
$chainref->{marked} = 1;
}
}