summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-question.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-11-24 01:25:24 +0100
committerLennart Poettering <lennart@poettering.net>2015-11-25 21:58:32 +0100
commit703e4f5e39c019da8c002ba10bd450ce378c0e91 (patch)
treee5d988cd7fa48e521ce4ed2708142d5ae3ed64be /src/resolve/resolved-dns-question.h
parentac7653a43314aed75ba6d9516cd596000a7355f9 (diff)
resolved: don't claim DnsQuestion have to have the same names
Wen DnsQuestion objects are used for DnsQuery objects all contained keys have to share the same name, but otherwise they generally don't have to, and this can actually happen in real-life because DnsPacket objects for mDNS use DnsQuestion for the question section. Hence, rename: dns_question_is_valid() to dns_question_is_valid_for_query(), since the name uniqueness check it does is only relevant when used for a query. Similar, rename dns_question_name() to dns_question_first_name(), to be more accurate, as this difference matters if we keys don#t have to share the same name.
Diffstat (limited to 'src/resolve/resolved-dns-question.h')
-rw-r--r--src/resolve/resolved-dns-question.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/resolve/resolved-dns-question.h b/src/resolve/resolved-dns-question.h
index 9894ef6ec5..d728b9bed2 100644
--- a/src/resolve/resolved-dns-question.h
+++ b/src/resolve/resolved-dns-question.h
@@ -25,7 +25,7 @@ typedef struct DnsQuestion DnsQuestion;
#include "resolved-dns-rr.h"
-/* A simple array of resources keys, all sharing the same domain */
+/* A simple array of resources keys */
struct DnsQuestion {
unsigned n_ref;
@@ -45,12 +45,12 @@ int dns_question_add(DnsQuestion *q, DnsResourceKey *key);
int dns_question_matches_rr(DnsQuestion *q, DnsResourceRecord *rr);
int dns_question_matches_cname(DnsQuestion *q, DnsResourceRecord *rr);
-int dns_question_is_valid(DnsQuestion *q);
+int dns_question_is_valid_for_query(DnsQuestion *q);
int dns_question_contains(DnsQuestion *a, DnsResourceKey *k);
int dns_question_is_equal(DnsQuestion *a, DnsQuestion *b);
int dns_question_cname_redirect(DnsQuestion *q, const DnsResourceRecord *cname, DnsQuestion **ret);
-const char *dns_question_name(DnsQuestion *q);
+const char *dns_question_first_name(DnsQuestion *q);
DEFINE_TRIVIAL_CLEANUP_FUNC(DnsQuestion*, dns_question_unref);