mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
We cannot really decide whether local configuration lines are meant for blocking or something else. Just record such queries as replied to from cache because this is what they are. This code made sense at the time where wildcards were implemented as dnsmasq config lines, however, we've advanced to our own regex engine since then and all config lines should have also been auto-migrated.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
+4
-17
@@ -1039,23 +1039,10 @@ void _FTL_reply(const unsigned int flags, const char *name, const union all_addr
|
||||
// Get time index
|
||||
const unsigned int timeidx = query->timeidx;
|
||||
|
||||
// Check whether this query was blocked
|
||||
if(strcmp(answer, "(NXDOMAIN)") == 0 ||
|
||||
strcmp(answer, "0.0.0.0") == 0 ||
|
||||
strcmp(answer, "::") == 0)
|
||||
{
|
||||
// Mark query as blocked
|
||||
clientsData* client = getClient(query->clientID, true);
|
||||
query_blocked(query, domain, client, QUERY_REGEX);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Answered from a custom (user provided) cache file
|
||||
counters->cached++;
|
||||
overTime[timeidx].cached++;
|
||||
|
||||
query->status = QUERY_CACHE;
|
||||
}
|
||||
// Answered from a custom (user provided) cache file
|
||||
counters->cached++;
|
||||
overTime[timeidx].cached++;
|
||||
query->status = QUERY_CACHE;
|
||||
|
||||
// Save reply type and update individual reply counters
|
||||
save_reply_type(flags, addr, query, response);
|
||||
|
||||
Reference in New Issue
Block a user