summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2023-03-31 18:49:22 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2023-03-31 22:45:35 +0100
commitc244d92d8a3f96e3a16b53f733190faa17004ae3 (patch)
tree0d51ce22ec48b1751afc548ed23ceca599c9b4ad
parent138e1e2a2d918b37cb0274fe310d53be35acf4cf (diff)
downloaddnsmasq-c244d92d8a3f96e3a16b53f733190faa17004ae3.tar.gz
Allow --cache-rr=ANY with the obvious meaning.
-rw-r--r--man/dnsmasq.82
-rw-r--r--src/util.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/man/dnsmasq.8 b/man/dnsmasq.8
index acb78df..37aea60 100644
--- a/man/dnsmasq.8
+++ b/man/dnsmasq.8
@@ -384,7 +384,7 @@ By default, dnsmasq caches A, AAAA, CNAME and SRV DNS record types.
This option adds other record types to the cache. The RR-type can be given
as a name such as TXT or MX or a decimal number. A single --cache-rr option
can take a comma-separated list or RR-types and more than one --cache-rr option
-is allowed.
+is allowed. Use --cache-rr=ANY to enable caching for all RR-types.
.TP
.B \-r, --resolv-file=<file>
Read the IP addresses of the upstream nameservers from <file>, instead of
diff --git a/src/util.c b/src/util.c
index 073d7ad..04cd2f0 100644
--- a/src/util.c
+++ b/src/util.c
@@ -119,7 +119,7 @@ int rr_on_list(struct rrlist *list, unsigned short rr)
{
while (list)
{
- if (list->rr == rr)
+ if (list->rr == rr || list->rr == T_ANY)
return 1;
list = list->next;