diff options
author | David Michael <david.michael@coreos.com> | 2016-08-31 15:34:29 -0700 |
---|---|---|
committer | David Michael <david.michael@coreos.com> | 2016-10-07 12:14:38 -0700 |
commit | 1ae43295751fc235e7f93719a635a5b06f3ac09b (patch) | |
tree | 942693237c80fa428220f0d719e0d7e72eaf4cbe /src/resolve/resolved-conf.c | |
parent | resolved: directly include some required headers instead of inheriting (diff) | |
download | systemd-1ae43295751fc235e7f93719a635a5b06f3ac09b.tar.gz systemd-1ae43295751fc235e7f93719a635a5b06f3ac09b.tar.bz2 systemd-1ae43295751fc235e7f93719a635a5b06f3ac09b.zip |
resolved: add an option to control the DNS stub listener
Diffstat (limited to 'src/resolve/resolved-conf.c')
-rw-r--r-- | src/resolve/resolved-conf.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/resolve/resolved-conf.c b/src/resolve/resolved-conf.c index dd233e7c4..246327daa 100644 --- a/src/resolve/resolved-conf.c +++ b/src/resolve/resolved-conf.c @@ -23,8 +23,19 @@ #include "extract-word.h" #include "parse-util.h" #include "resolved-conf.h" +#include "string-table.h" #include "string-util.h" +DEFINE_CONFIG_PARSE_ENUM(config_parse_dns_stub_listener_mode, dns_stub_listener_mode, DnsStubListenerMode, "Failed to parse DNS stub listener mode setting"); + +static const char* const dns_stub_listener_mode_table[_DNS_STUB_LISTENER_MODE_MAX] = { + [DNS_STUB_LISTENER_NO] = "no", + [DNS_STUB_LISTENER_UDP] = "udp", + [DNS_STUB_LISTENER_TCP] = "tcp", + [DNS_STUB_LISTENER_YES] = "yes", +}; +DEFINE_STRING_TABLE_LOOKUP_WITH_BOOLEAN(dns_stub_listener_mode, DnsStubListenerMode, DNS_STUB_LISTENER_YES); + int manager_add_dns_server_by_string(Manager *m, DnsServerType type, const char *word) { union in_addr_union address; int family, r, ifindex = 0; |