diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-01 16:04:12 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-01 16:06:39 +0200 |
commit | 4e945a6f7971fd7d1f6b2c62ee3afdaff3c95ce4 (patch) | |
tree | b36f290a2aeda5bfb77d20b2953898c3d3c36382 /src/resolve/resolved.c | |
parent | e70df46b9721a3d025e7a0b4ffb5893cbde5e55d (diff) |
resolved: beef up DNS server configuration logic
We now maintain two lists of DNS servers: system servers and fallback
servers.
system servers are used in combination with any per-link servers.
fallback servers are only used if there are no system servers or
per-link servers configured.
The system server list is supposed to be populated from a foreign tool's
/etc/resolv.conf (not implemented yet).
Also adds a configuration switch for LLMNR, that allows configuring
whether LLMNR shall be used simply for resolving or also for responding.
Diffstat (limited to 'src/resolve/resolved.c')
-rw-r--r-- | src/resolve/resolved.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index 275f99c924..b4d743fe0d 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -21,12 +21,12 @@ #include "sd-event.h" #include "sd-daemon.h" - -#include "resolved.h" - #include "mkdir.h" #include "capability.h" +#include "resolved.h" +#include "resolved-conf.h" + int main(int argc, char *argv[]) { _cleanup_(manager_freep) Manager *m = NULL; const char *user = "systemd-resolve"; @@ -55,8 +55,7 @@ int main(int argc, char *argv[]) { /* Always create the directory where resolv.conf will live */ r = mkdir_safe_label("/run/systemd/resolve", 0755, uid, gid); if (r < 0) { - log_error("Could not create runtime directory: %s", - strerror(-r)); + log_error("Could not create runtime directory: %s", strerror(-r)); goto finish; } @@ -74,15 +73,13 @@ int main(int argc, char *argv[]) { r = manager_parse_config_file(m); if (r < 0) - return r; + log_warning("Failed to parse configuration file: %s", strerror(-r)); - /* write finish default resolv.conf to avoid a dangling + /* Write finish default resolv.conf to avoid a dangling * symlink */ r = manager_write_resolv_conf(m); - if (r < 0) { - log_error("Could not create resolv.conf: %s", strerror(-r)); - goto finish; - } + if (r < 0) + log_warning("Could not create resolv.conf: %s", strerror(-r)); sd_notify(false, "READY=1\n" |