mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Add --cache-rr to enable caching of arbitrary RR types.
This commit is contained in:
17
src/util.c
17
src/util.c
@@ -115,6 +115,19 @@ u64 rand64(void)
|
||||
return (u64)out[outleft+1] + (((u64)out[outleft]) << 32);
|
||||
}
|
||||
|
||||
int rr_on_list(struct rrlist *list, unsigned short rr)
|
||||
{
|
||||
while (list)
|
||||
{
|
||||
if (list->rr == rr)
|
||||
return 1;
|
||||
|
||||
list = list->next;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* returns 1 if name is OK and ascii printable
|
||||
* returns 2 if name should be processed by IDN */
|
||||
static int check_name(char *in)
|
||||
@@ -280,11 +293,9 @@ unsigned char *do_rfc1035_name(unsigned char *p, char *sval, char *limit)
|
||||
if (limit && p + 1 > (unsigned char*)limit)
|
||||
return NULL;
|
||||
|
||||
#ifdef HAVE_DNSSEC
|
||||
if (option_bool(OPT_DNSSEC_VALID) && *sval == NAME_ESCAPE)
|
||||
if (*sval == NAME_ESCAPE)
|
||||
*p++ = (*(++sval))-1;
|
||||
else
|
||||
#endif
|
||||
*p++ = *sval;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user