diff options
author | Tom Gundersen <teg@jklm.no> | 2015-11-19 02:22:12 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-11-19 02:22:12 +0100 |
commit | 854c1123f5fb6704e900d34c0165360f77ce4ef8 (patch) | |
tree | fce7df637e3e88fe5ce837a15f22d99e2e8d0adb /src/resolve/resolved-dns-transaction.c | |
parent | 25422154e8ebda7a9bfd52d7e0cbd7254fed39b3 (diff) | |
parent | 39609489ca9925f94fdd4ef12a8b3d5ee2e14ddd (diff) |
Merge pull request #1944 from poettering/randoms-ec
add RandomSec= setting to timer units, and more
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index 6545f6cd8a..37f47c47c0 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -626,6 +626,20 @@ int dns_transaction_go(DnsTransaction *t) { t->cached = dns_answer_unref(t->cached); t->cached_rcode = 0; + /* Check the zone, but obly if this transaction is not used + * for probing or verifying a zone item. */ + if (set_isempty(t->zone_items)) { + + r = dns_zone_lookup(&t->scope->zone, t->key, &t->cached, NULL, NULL); + if (r < 0) + return r; + if (r > 0) { + t->cached_rcode = DNS_RCODE_SUCCESS; + dns_transaction_complete(t, DNS_TRANSACTION_SUCCESS); + return 0; + } + } + /* Check the cache, but only if this transaction is not used * for probing or verifying a zone item. */ if (set_isempty(t->zone_items)) { |