diff options
author | Tom Gundersen <teg@jklm.no> | 2016-01-20 11:30:20 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2016-01-20 11:30:20 +0100 |
commit | f7e29f72bf5a440737bdf8a1fc81053b5f44cb64 (patch) | |
tree | 333c2532daa887e206aec8947c9927be0900c75e /src/resolve/resolved-manager.c | |
parent | d619a0c4a5bf4f9d5796bcac77160a14e4e24cb6 (diff) | |
parent | c69fa7e3c44240bedc0ee1bd89fecf954783ac85 (diff) |
Merge pull request #2372 from poettering/dnssec17
resolved bus API improvements
Diffstat (limited to 'src/resolve/resolved-manager.c')
-rw-r--r-- | src/resolve/resolved-manager.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c index b17a19d331..d6d75a3f78 100644 --- a/src/resolve/resolved-manager.c +++ b/src/resolve/resolved-manager.c @@ -1173,3 +1173,33 @@ int manager_compile_search_domains(Manager *m, OrderedSet **domains) { return 0; } + +DnssecMode manager_get_dnssec_mode(Manager *m) { + assert(m); + + if (m->dnssec_mode != _DNSSEC_MODE_INVALID) + return m->dnssec_mode; + + return DNSSEC_NO; +} + +bool manager_dnssec_supported(Manager *m) { + DnsServer *server; + Iterator i; + Link *l; + + assert(m); + + if (manager_get_dnssec_mode(m) == DNSSEC_NO) + return false; + + server = manager_get_dns_server(m); + if (server && !dns_server_dnssec_supported(server)) + return false; + + HASHMAP_FOREACH(l, m->links, i) + if (!link_dnssec_supported(l)) + return false; + + return true; +} |