mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Don't set regex status for domains read from database as we don't add them to the resolvers cache here (performance reasons)
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
@@ -621,7 +621,7 @@ void getAllQueries(char *client_message, int *sock)
|
||||
|
||||
char *qtype = (queries[i].type == TYPE_A)? "A" : "AAAA";
|
||||
|
||||
// 1 = gravity.list, 5 = black.list
|
||||
// 1 = gravity.list, 4 = wildcard, 5 = black.list
|
||||
if((queries[i].status == QUERY_GRAVITY ||
|
||||
queries[i].status == QUERY_WILDCARD ||
|
||||
queries[i].status == QUERY_BLACKLIST) && !showblocked)
|
||||
@@ -708,13 +708,14 @@ void getRecentBlocked(char *client_message, int *sock)
|
||||
num = 0;
|
||||
}
|
||||
|
||||
// Find most recent query with either status blocked
|
||||
// Find most recently blocked query
|
||||
int found = 0;
|
||||
for(i = counters.queries - 1; i > 0 ; i--)
|
||||
{
|
||||
validate_access("queries", i, true, __LINE__, __FUNCTION__, __FILE__);
|
||||
|
||||
if(queries[i].status == QUERY_GRAVITY ||
|
||||
queries[i].status == QUERY_WILDCARD ||
|
||||
queries[i].status == QUERY_BLACKLIST)
|
||||
{
|
||||
found++;
|
||||
|
||||
@@ -690,10 +690,6 @@ void read_data_from_DB(void)
|
||||
int timeidx = findOverTimeID(overTimeTimeStamp);
|
||||
validate_access("overTime", timeidx, true, __LINE__, __FUNCTION__, __FILE__);
|
||||
|
||||
// Handle wildcard blocked entries read from database
|
||||
if(status == QUERY_WILDCARD)
|
||||
domains[domainID].regexmatch = REGEX_BLOCKED;
|
||||
|
||||
// Store this query in memory
|
||||
validate_access("queries", queryID, false, __LINE__, __FUNCTION__, __FILE__);
|
||||
queries[queryID].magic = MAGICBYTE;
|
||||
|
||||
Reference in New Issue
Block a user