Now that layer7 daemon issues are resolved bring back this optimization.

Revert "Do not write ont rules anymore max-packets. This apparently was done by me in a previous commit, it helps with Ticket #636."

This reverts commit c8703797e5.
This commit is contained in:
Ermal 2011-05-02 20:41:05 +00:00
parent b01adece6e
commit 2dc14ea286

View File

@ -1886,7 +1886,7 @@ function filter_generate_user_rule($rule) {
} else
$aline['flags'] .= "keep state ";
if($noadvoptions == false)
if($noadvoptions == false || $l7_present)
if( (isset($rule['source-track']) and $rule['source-track'] <> "") or
(isset($rule['max']) and $rule['max'] <> "") or
(isset($rule['max-src-nodes']) and $rule['max-src-nodes'] <> "") or
@ -1895,7 +1895,7 @@ function filter_generate_user_rule($rule) {
(isset($rule['max-src-conn-rates']) and $rule['max-src-conn-rates'] <> "") or
(isset($rule['max-src-states']) and $rule['max-src-states'] <> "") or
(isset($rule['statetimeout']) and $rule['statetimeout'] <> "") or
isset($rule['sloppy'])) {
isset($rule['sloppy']) or $l7_present) {
$aline['flags'] .= "( ";
if (isset($rule['sloppy']))
$aline['flags'] .= "sloppy ";