]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
resolved: pass out precise authenticated bit we got passed in
authorLennart Poettering <lennart@poettering.net>
Fri, 18 Dec 2015 18:29:47 +0000 (19:29 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 18 Dec 2015 18:29:50 +0000 (19:29 +0100)
Make sure the cache never altes the authenticated bit of RRs stored in
it, and drops it for RRs when passing it out again.

src/resolve/resolved-dns-cache.c

index a4fc18551496c453cd5bee8a667478b61e355352..451875ece01ac14525524f55e2a54705af24b6a8 100644 (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;
         }