Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

backport: Engine mode fixes v7 #8801

Commits on May 3, 2023

  1. bpf: refactor the BPF code and postpone querying of the engine mode

    BPF codebase queried engine mode earlier than it was determined from
    the configuration file/command line. As a result it used the default (IDS)
    mode where it could've been configured later on to the IPS mode.
    This could lead into an undefined behavior as some Suricata modules behave
    according to the engine mode.
    
    PF-Ring, Netmap and AF-Packet all shared almost identical code for
    determining the engine mode. It was put into one common function.
    Omitted the usage of SCStrdup function in PF-Ring module as it is
    uppercased during thread initialization phase.
    
    Ticket: OISF#5958
    Lukas Sismis authored and lukashino committed May 3, 2023
    Configuration menu
    Copy the full SHA
    1ca1249 View commit details
    Browse the repository at this point in the history
  2. runmodes: earlier evaluation of IPS mode

    Move evaluation of engine runmode to an earlier
    phase so that dependend modules rely on properly
    configured engine runmode.
    
    Ticket: OISF#5958
    Lukas Sismis authored and lukashino committed May 3, 2023
    Configuration menu
    Copy the full SHA
    654383f View commit details
    Browse the repository at this point in the history
  3. runmodes: introduce unknown engine runmode

    To prevent unset values of engine runmode,
    this commit introduces unknown runmode which
    can detect when engine runmode is being used
    uninitialized.
    
    Ticket: OISF#6033
    Lukas Sismis authored and lukashino committed May 3, 2023
    Configuration menu
    Copy the full SHA
    f53da1a View commit details
    Browse the repository at this point in the history