diff options
author | Iwan Timmer <irtimmer@gmail.com> | 2018-06-13 20:26:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-06-14 09:57:56 +0200 |
commit | c9299be2f5a634881d6d9053cc93d093df040671 (patch) | |
tree | 2334524eaa17c6b36775ef36a045ea6ed7705a88 /src/resolve/resolved-link.c | |
parent | Merge pull request #9263 from poettering/log-serialize (diff) | |
download | systemd-c9299be2f5a634881d6d9053cc93d093df040671.tar.xz systemd-c9299be2f5a634881d6d9053cc93d093df040671.zip |
resolve: rename PrivateDNS to DNSOverTLS
PrivateDNS is not considered a good name for this option, so rename it to DNSOverTLS
Diffstat (limited to 'src/resolve/resolved-link.c')
-rw-r--r-- | src/resolve/resolved-link.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/resolve/resolved-link.c b/src/resolve/resolved-link.c index aceea66ed6..8e7db29f9f 100644 --- a/src/resolve/resolved-link.c +++ b/src/resolve/resolved-link.c @@ -41,7 +41,7 @@ int link_new(Manager *m, Link **ret, int ifindex) { l->llmnr_support = RESOLVE_SUPPORT_YES; l->mdns_support = RESOLVE_SUPPORT_NO; l->dnssec_mode = _DNSSEC_MODE_INVALID; - l->private_dns_mode = _PRIVATE_DNS_MODE_INVALID; + l->dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID; l->operstate = IF_OPER_UNKNOWN; if (asprintf(&l->state_file, "/run/systemd/resolve/netif/%i", ifindex) < 0) @@ -66,7 +66,7 @@ void link_flush_settings(Link *l) { l->llmnr_support = RESOLVE_SUPPORT_YES; l->mdns_support = RESOLVE_SUPPORT_NO; l->dnssec_mode = _DNSSEC_MODE_INVALID; - l->private_dns_mode = _PRIVATE_DNS_MODE_INVALID; + l->dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID; dns_server_unlink_all(l->dns_servers); dns_search_domain_unlink_all(l->search_domains); @@ -354,26 +354,26 @@ clear: return r; } -void link_set_private_dns_mode(Link *l, PrivateDnsMode mode) { +void link_set_dns_over_tls_mode(Link *l, DnsOverTlsMode mode) { assert(l); #if ! HAVE_GNUTLS - if (mode != PRIVATE_DNS_NO) - log_warning("Private DNS option for the link cannot be set to opportunistic when systemd-resolved is built without gnutls support. Turning off Private DNS support."); + if (mode != DNS_OVER_TLS_NO) + log_warning("DNS-over-TLS option for the link cannot be set to opportunistic when systemd-resolved is built without gnutls support. Turning off DNS-over-TLS support."); return; #endif - l->private_dns_mode = mode; + l->dns_over_tls_mode = mode; } -static int link_update_private_dns_mode(Link *l) { +static int link_update_dns_over_tls_mode(Link *l) { _cleanup_free_ char *b = NULL; int r; assert(l); - r = sd_network_link_get_private_dns(l->ifindex, &b); + r = sd_network_link_get_dns_over_tls(l->ifindex, &b); if (r == -ENODATA) { r = 0; goto clear; @@ -381,8 +381,8 @@ static int link_update_private_dns_mode(Link *l) { if (r < 0) goto clear; - l->private_dns_mode = private_dns_mode_from_string(b); - if (l->private_dns_mode < 0) { + l->dns_over_tls_mode = dns_over_tls_mode_from_string(b); + if (l->dns_over_tls_mode < 0) { r = -EINVAL; goto clear; } @@ -390,7 +390,7 @@ static int link_update_private_dns_mode(Link *l) { return 0; clear: - l->private_dns_mode = _PRIVATE_DNS_MODE_INVALID; + l->dns_over_tls_mode = _DNS_OVER_TLS_MODE_INVALID; return r; } @@ -601,9 +601,9 @@ static void link_read_settings(Link *l) { if (r < 0) log_warning_errno(r, "Failed to read mDNS support for interface %s, ignoring: %m", l->name); - r = link_update_private_dns_mode(l); + r = link_update_dns_over_tls_mode(l); if (r < 0) - log_warning_errno(r, "Failed to read Private DNS mode for interface %s, ignoring: %m", l->name); + log_warning_errno(r, "Failed to read DNS-over-TLS mode for interface %s, ignoring: %m", l->name); r = link_update_dnssec_mode(l); if (r < 0) @@ -738,13 +738,13 @@ void link_next_dns_server(Link *l) { link_set_dns_server(l, l->dns_servers); } -PrivateDnsMode link_get_private_dns_mode(Link *l) { +DnsOverTlsMode link_get_dns_over_tls_mode(Link *l) { assert(l); - if (l->private_dns_mode != _PRIVATE_DNS_MODE_INVALID) - return l->private_dns_mode; + if (l->dns_over_tls_mode != _DNS_OVER_TLS_MODE_INVALID) + return l->dns_over_tls_mode; - return manager_get_private_dns_mode(l->manager); + return manager_get_dns_over_tls_mode(l->manager); } DnssecMode link_get_dnssec_mode(Link *l) { |