summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-link-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-01-19 21:48:01 +0100
committerLennart Poettering <lennart@poettering.net>2016-01-19 21:56:54 +0100
commitc69fa7e3c44240bedc0ee1bd89fecf954783ac85 (patch)
tree42c7490e0639a76a2a56227ea56a928c2a3bca58 /src/resolve/resolved-link-bus.c
parentd2ec6608b93e3f74345c737637af24e9e75c209b (diff)
resolved: rework DNSSECSupported property
Not only report whether the server actually supports DNSSEC, but also first check whether DNSSEC is actually enabled for it in our local configuration. Also, export a per-link DNSSECSupported property in addition to the existing manager-wide property.
Diffstat (limited to 'src/resolve/resolved-link-bus.c')
-rw-r--r--src/resolve/resolved-link-bus.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/resolve/resolved-link-bus.c b/src/resolve/resolved-link-bus.c
index 3fec92545d..20352a3e51 100644
--- a/src/resolve/resolved-link-bus.c
+++ b/src/resolve/resolved-link-bus.c
@@ -142,6 +142,23 @@ static int property_get_ntas(
return sd_bus_message_close_container(reply);
}
+static int property_get_dnssec_supported(
+ sd_bus *bus,
+ const char *path,
+ const char *interface,
+ const char *property,
+ sd_bus_message *reply,
+ void *userdata,
+ sd_bus_error *error) {
+
+ Link *l = userdata;
+
+ assert(reply);
+ assert(l);
+
+ return sd_bus_message_append(reply, "b", link_dnssec_supported(l));
+}
+
int bus_link_method_set_dns_servers(sd_bus_message *message, void *userdata, sd_bus_error *error) {
_cleanup_free_ struct in_addr_data *dns = NULL;
size_t allocated = 0, n = 0;
@@ -418,6 +435,7 @@ const sd_bus_vtable link_vtable[] = {
SD_BUS_PROPERTY("MulticastDNS", "s", property_get_resolve_support, offsetof(Link, mdns_support), 0),
SD_BUS_PROPERTY("DNSSEC", "s", property_get_dnssec_mode, offsetof(Link, dnssec_mode), 0),
SD_BUS_PROPERTY("DNSSECNegativeTrustAnchors", "as", property_get_ntas, 0, 0),
+ SD_BUS_PROPERTY("DNSSECSupport", "b", property_get_dnssec_supported, 0, 0),
SD_BUS_METHOD("SetDNS", "a(iay)", NULL, bus_link_method_set_dns_servers, 0),
SD_BUS_METHOD("SetDomains", "as", NULL, bus_link_method_set_search_domains, 0),