summaryrefslogtreecommitdiff
path: root/src/resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-12-18 14:33:59 +0100
committerLennart Poettering <lennart@poettering.net>2015-12-18 14:48:50 +0100
commitaae6a86e1af88db640180de824e064069a448aeb (patch)
tree4bc3310f790dee96a10932ca635b8e0f8207d4ed /src/resolve
parent1849cb7cb723e8ea7c13b967d056c1d3a36d9042 (diff)
resolved: refuse to add auxiliary transactions loops
Let's be safe and explicitly avoid that we add an auxiliary transaction dependency on ourselves.
Diffstat (limited to 'src/resolve')
-rw-r--r--src/resolve/resolved-dns-transaction.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c
index e65593e143..5b6846f008 100644
--- a/src/resolve/resolved-dns-transaction.c
+++ b/src/resolve/resolved-dns-transaction.c
@@ -1181,6 +1181,12 @@ static int dns_transaction_request_dnssec_rr(DnsTransaction *t, DnsResourceKey *
assert(t);
assert(key);
+ r = dns_resource_key_equal(t->key, key);
+ if (r < 0)
+ return r;
+ if (r > 0) /* Don't go in circles */
+ return 0;
+
/* Try to get the data from the trust anchor */
r = dns_trust_anchor_lookup(&t->scope->manager->trust_anchor, key, &a);
if (r < 0)