diff options
author | Daniel Mack <github@zonque.org> | 2015-09-16 17:59:11 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-09-16 17:59:11 +0200 |
commit | 7ed1f63d506f8023db57e496519c7ef63820762e (patch) | |
tree | 99ef11732f301e00ac213d58a91690dd4f9b66f8 /src/resolve/resolved-dns-question.c | |
parent | b91a501fcd618a7f7a34e64cec9f74394fb0bad8 (diff) | |
parent | 5eefe544efbfbbd0d0026ca28913a9e82fec187c (diff) |
Merge pull request #1279 from teg/resolved-cname-cache
resolevd: cache - improve CNAME handling
Diffstat (limited to 'src/resolve/resolved-dns-question.c')
-rw-r--r-- | src/resolve/resolved-dns-question.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-question.c b/src/resolve/resolved-dns-question.c index c94928d725..1507f22da0 100644 --- a/src/resolve/resolved-dns-question.c +++ b/src/resolve/resolved-dns-question.c @@ -242,13 +242,13 @@ int dns_question_is_equal(DnsQuestion *a, DnsQuestion *b) { return 1; } -int dns_question_cname_redirect(DnsQuestion *q, const char *name, DnsQuestion **ret) { +int dns_question_cname_redirect(DnsQuestion *q, const DnsResourceRecord *cname, DnsQuestion **ret) { _cleanup_(dns_question_unrefp) DnsQuestion *n = NULL; bool same = true; unsigned i; int r; - assert(name); + assert(cname); assert(ret); if (!q) { @@ -262,7 +262,7 @@ int dns_question_cname_redirect(DnsQuestion *q, const char *name, DnsQuestion ** } for (i = 0; i < q->n_keys; i++) { - r = dns_name_equal(DNS_RESOURCE_KEY_NAME(q->keys[i]), name); + r = dns_name_equal(DNS_RESOURCE_KEY_NAME(q->keys[i]), cname->cname.name); if (r < 0) return r; @@ -286,7 +286,7 @@ int dns_question_cname_redirect(DnsQuestion *q, const char *name, DnsQuestion ** for (i = 0; i < q->n_keys; i++) { _cleanup_(dns_resource_key_unrefp) DnsResourceKey *k = NULL; - k = dns_resource_key_new(q->keys[i]->class, q->keys[i]->type, name); + k = dns_resource_key_new_redirect(q->keys[i], cname); if (!k) return -ENOMEM; |