resolved: pass out precise authenticated bit we got passed in

Make sure the cache never altes the authenticated bit of RRs stored in
it, and drops it for RRs when passing it out again.
This commit is contained in:
Lennart Poettering
2015-12-18 19:29:50 +01:00
parent 9a9999a713
commit eed749cca6
+1 -1
View File
@@ -757,7 +757,7 @@ int dns_cache_lookup(DnsCache *c, DnsResourceKey *key, int *rcode, DnsAnswer **r
if (!j->rr)
continue;
r = dns_answer_add(answer, j->rr, 0, have_authenticated && !have_non_authenticated ? DNS_ANSWER_AUTHENTICATED : 0);
r = dns_answer_add(answer, j->rr, 0, j->authenticated ? DNS_ANSWER_AUTHENTICATED : 0);
if (r < 0)
return r;
}