Adds support to GeoIP operator and variables.

This commit is contained in:
Felipe Zimmerle
2015-07-20 21:04:21 -03:00
parent 41bf1490b7
commit e189055ec3
17 changed files with 890 additions and 53 deletions

View File

@@ -18,6 +18,7 @@ class Driver;
#include "variable_duration.h"
#include "variable_env.h"
#include "variable_modsec_build.h"
#include "utils/geo_lookup.h"
using ModSecurity::actions::Action;
using ModSecurity::actions::transformations::Transformation;
@@ -27,6 +28,7 @@ using ModSecurity::VariableDuration;
using ModSecurity::VariableEnv;
using ModSecurity::VariableModsecBuild;
using ModSecurity::Rule;
using ModSecurity::Utils::GeoLookup;
}
// The parsing context.
@@ -90,6 +92,8 @@ using ModSecurity::Rule;
%token <std::string> RUN_TIME_VAR_ENV
%token <std::string> RUN_TIME_VAR_BLD
%token <std::string> CONFIG_DIR_GEO_DB
%token <std::string> OPERATOR
%token <std::string> ACTION
%token <std::string> TRANSFORMATION
@@ -238,6 +242,10 @@ expression:
driver.debug_log_path = $1;
}
/* Debug log: end */
| CONFIG_DIR_GEO_DB
{
GeoLookup::getInstance().setDataBase($1);
}
variables:
variables PIPE VARIABLE