diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-25 16:36:19 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-10-25 16:41:25 +0200 |
commit | 4a6f996c01db3375a6fd0eb69f7792f1149449bb (patch) | |
tree | 20917e20eb60207c1670243e0ff12a404cf3561d /src/resolve | |
parent | 86c0411ee570ce01f73da819affec7ce75b8c0f6 (diff) | |
download | systemd-4a6f996c01db3375a6fd0eb69f7792f1149449bb.tar.gz |
resolved: emit change for CurrentDNSServer
Diffstat (limited to 'src/resolve')
-rw-r--r-- | src/resolve/resolved-bus.c | 2 | ||||
-rw-r--r-- | src/resolve/resolved-dns-server.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 4c18cb1597..2c1aba911a 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -1841,7 +1841,7 @@ static const sd_bus_vtable resolve_vtable[] = { SD_BUS_PROPERTY("DNSOverTLS", "s", bus_property_get_dns_over_tls_mode, 0, 0), SD_BUS_PROPERTY("DNS", "a(iiay)", bus_property_get_dns_servers, 0, SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("FallbackDNS", "a(iiay)", bus_property_get_fallback_dns_servers, offsetof(Manager, fallback_dns_servers), SD_BUS_VTABLE_PROPERTY_CONST), - SD_BUS_PROPERTY("CurrentDNSServer", "(iiay)", bus_property_get_current_dns_server, offsetof(Manager, current_dns_server), 0), + SD_BUS_PROPERTY("CurrentDNSServer", "(iiay)", bus_property_get_current_dns_server, offsetof(Manager, current_dns_server), SD_BUS_VTABLE_PROPERTY_EMITS_CHANGE), SD_BUS_PROPERTY("Domains", "a(isb)", bus_property_get_domains, 0, 0), SD_BUS_PROPERTY("TransactionStatistics", "(tt)", bus_property_get_transaction_statistics, 0, 0), SD_BUS_PROPERTY("CacheStatistics", "(ttt)", bus_property_get_cache_statistics, 0, 0), diff --git a/src/resolve/resolved-dns-server.c b/src/resolve/resolved-dns-server.c index cbb3d524b0..9f2c97314f 100644 --- a/src/resolve/resolved-dns-server.c +++ b/src/resolve/resolved-dns-server.c @@ -3,6 +3,7 @@ #include "sd-messages.h" #include "alloc-util.h" +#include "resolved-bus.h" #include "resolved-dns-server.h" #include "resolved-dns-stub.h" #include "resolved-resolv-conf.h" @@ -681,6 +682,8 @@ DnsServer *manager_set_dns_server(Manager *m, DnsServer *s) { if (m->unicast_scope) dns_cache_flush(&m->unicast_scope->cache); + (void) manager_send_changed(m, "CurrentDNSServer"); + return s; } |