Adds initial support to SecHttpBlKey

This commit is contained in:
Victor Hora
2017-07-29 00:12:14 -03:00
committed by Felipe Zimmerle
parent 515e073503
commit 53ff0e1a57
7 changed files with 5703 additions and 5639 deletions

View File

@@ -33,7 +33,10 @@ namespace operators {
std::string Rbl::mapIpToAddress(std::string ipStr, Transaction *trans) {
std::string addr;
int h0, h1, h2, h3;
std::string key = trans->m_rules->m_httpblKey.m_value;
std::string key;
if (trans->m_rules->m_httpblKey.m_set == true) {
key = trans->m_rules->m_httpblKey.m_value;
}
if (sscanf(ipStr.c_str(), "%d.%d.%d.%d", &h0, &h1, &h2, &h3) != 4) {
debug(trans, 0, std::string("Failed to understand `" + ipStr +