summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-11-10 18:06:19 +0100
committerLennart Poettering <lennart@poettering.net>2021-02-16 10:03:43 +0100
commit43fc4baa26ccf3bc5ee65d4c6fa4890084632f2b (patch)
tree48a1349811c1c8e62c10e7dada6f6a3a99bcc2f7 /src/resolve/resolved-bus.c
parent6f055e43b817b66e6d4f6e4022f0a115dc35651b (diff)
downloadsystemd-43fc4baa26ccf3bc5ee65d4c6fa4890084632f2b.tar.gz
resolved: add "confidential" flag for replies passed to clients
Let's introduce a new flag that indicates whether the response was acquired in "confidential" mode, i.e. via encrypted DNS-over-TLS, or synthesized locally. Fixes: #12859
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r--src/resolve/resolved-bus.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index 0c1124f7dd..90e043be62 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -252,7 +252,7 @@ static void bus_method_resolve_hostname_complete(DnsQuery *q) {
r = sd_bus_message_append(
reply, "st",
normalized,
- SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family, dns_query_fully_authenticated(q)));
+ dns_query_reply_flags_make(q));
if (r < 0)
goto finish;
@@ -367,7 +367,7 @@ static int parse_as_address(sd_bus_message *m, int ifindex, const char *hostname
return r;
r = sd_bus_message_append(reply, "st", canonical,
- SD_RESOLVED_FLAGS_MAKE(dns_synthesize_protocol(flags), ff, true));
+ SD_RESOLVED_FLAGS_MAKE(dns_synthesize_protocol(flags), ff, true, true));
if (r < 0)
return r;
@@ -510,7 +510,7 @@ static void bus_method_resolve_address_complete(DnsQuery *q) {
if (r < 0)
goto finish;
- r = sd_bus_message_append(reply, "t", SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family, dns_query_fully_authenticated(q)));
+ r = sd_bus_message_append(reply, "t", dns_query_reply_flags_make(q));
if (r < 0)
goto finish;
@@ -672,7 +672,7 @@ static void bus_method_resolve_record_complete(DnsQuery *q) {
if (r < 0)
goto finish;
- r = sd_bus_message_append(reply, "t", SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family, dns_query_fully_authenticated(q)));
+ r = sd_bus_message_append(reply, "t", dns_query_reply_flags_make(q));
if (r < 0)
goto finish;
@@ -1048,7 +1048,7 @@ static void resolve_service_all_complete(DnsQuery *q) {
reply,
"ssst",
name, type, domain,
- SD_RESOLVED_FLAGS_MAKE(q->answer_protocol, q->answer_family, dns_query_fully_authenticated(q)));
+ dns_query_reply_flags_make(q));
if (r < 0)
goto finish;