-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Description
Unfortunately the RBL operator returns the originally IP on match, but not the "real" response. This means, that this operator only could be used on a boolean base like "If there is a DNS response, then match".
IMHO being able to filter requests based on a score would be much better and more feasible, so I changed the code like mentioned below.
if (rule && t && rule->hasCaptureAction()) {
char *respBl;
int first, second, third, fourth;
respBl = inet_ntoa(sin.sin_addr);
if (sscanf(respBl, "%d.%d.%d.%d", &first, &second, &third, &fourth) != 4) {
ms_dbg_a(t, 4, "RBL lookup of " + ipStr + " failed: bad response");
//return false;
}
else {
t->m_collections.m_tx_collection->storeOrUpdateFirst(
"1", std::string(respBl));
t->m_collections.m_tx_collection->storeOrUpdateFirst(
"2", std::to_string(fourth));
}
furtherInfo(&sin, ipStr, t, m_provider);
}
trans->m_collections.m_tx_collection->storeOrUpdateFirst(
"2", std::to_string(score));
trans->m_collections.m_tx_collection->storeOrUpdateFirst(
"3", std::to_string(type));
trans->m_collections.m_tx_collection->storeOrUpdateFirst(
"4", std::to_string(days));
Metadata
Metadata
Assignees
Labels
No labels