mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Required FTL changes due to the preceding dnsmasq commit.
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
+15
-4
@@ -41,6 +41,9 @@
|
||||
// get_edestr()
|
||||
#include "api_helper.h"
|
||||
|
||||
// defined in src/dnsmasq/cache.c
|
||||
extern char *querystr(char *desc, unsigned short type);
|
||||
|
||||
#define min(a,b) ({ __typeof__ (a) _a = (a); __typeof__ (b) _b = (b); _a < _b ? _a : _b; })
|
||||
|
||||
/* qsort comparision function (count field), sort ASC */
|
||||
@@ -881,10 +884,18 @@ void getAllQueries(const char *client_message, const int *sock)
|
||||
char othertype[12] = { 0 }; // Maximum is "TYPE65535" = 10 bytes
|
||||
if(query->type == TYPE_OTHER)
|
||||
{
|
||||
// Format custom type into buffer
|
||||
sprintf(othertype, "TYPE%u", query->qtype);
|
||||
// Replace qtype pointer
|
||||
qtype = othertype;
|
||||
// Check the dnsmasq RR types table for a matching record
|
||||
qtype = querystr((char*)"", query->qtype);
|
||||
logg("Typestr: %s", qtype);
|
||||
|
||||
// If not known (querystr() returned "type=1234"), we replace this
|
||||
if(!qtype || strstr(qtype, "type=") != NULL)
|
||||
{
|
||||
// Format custom type into buffer
|
||||
sprintf(othertype, "TYPE%u", query->qtype);
|
||||
// Replace qtype pointer
|
||||
qtype = othertype;
|
||||
}
|
||||
}
|
||||
|
||||
// Hide UNKNOWN queries when not requesting both query status types
|
||||
|
||||
Reference in New Issue
Block a user