]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect: make detect engine types explicit
authorVictor Julien <victor@inliniac.net>
Wed, 27 Jun 2018 11:44:06 +0000 (13:44 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 28 Jun 2018 09:06:56 +0000 (11:06 +0200)
commit6e9d81289db477a37fc399081a4feae0e6d3fc0e
treefdcc13da0fcfb6a86932fe2bd727b296da0bc460
parentb5bc509857faff0179a2fb0b900692f1aa17cba8
detect: make detect engine types explicit

There are 3 types of detect engine objects:
    1. normal
       The normal detection engine if no multi-tenancy is in use

    2. tenant
       A per tenant detection engine

    3. stub
       A stub (or minimal as it was called before) detect engine
       that is needed to have something in place when there are
       only tenants.

       A stub is also used in case of 'delayed detect', where we
       need a minimal detect engine to start up which is replaced
       by a full (normal type) detect engine after startup.

This patch adds a new field 'type' to the DetectEngineCtx object
to distinguish between the types. This replaces the boolean 'minimal'.
src/detect-engine.c
src/detect-engine.h
src/detect.h
src/suricata.c