summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-resolv-conf.c
AgeCommit message (Collapse)Author
2015-11-27resolved: flush the global DNS cache if /etc/resolv.conf is touchedLennart Poettering
After all /etc/resolv.conf is usually done when the network configuration changes, which is a good reason to flush the global cache. See: #2038
2015-11-27resolved: don't clear the server list too eagerlyLennart Poettering
If /etc/resolv.conf is missing, this should not result in the server list to be cleared, after all the native data from resolved.conf shouldn't be flushed out then. Hence flush out the data only if /etc/resolv.conf exists, but we cannot read it for some reason.
2015-11-25resolved: split out calls to compile full list of dns servers and search domainsLennart Poettering
Let's split this out from the resolv.conf parser, so that this becomes generically useful.
2015-11-25resolved: unify DnsServer handling code between Link and ManagerLennart Poettering
This copies concepts we introduced for the DnsSearchDomain stuff, and reworks the operations on lists of dns servers to be reusable and generic for use both with the Link and the Manager object.
2015-11-25resolved: add a generic DnsSearchDomain conceptLennart Poettering
With this change, we add a new object to resolved, "DnsSearchDomain=" which wraps a search domain. This is then used to introduce a global search domain list, in addition to the existing per-link search domain list which is reword to make use of this new object too. This is preparation for implement proper unicast DNS search domain support.
2015-11-25resolved: rework dns server lifecycle logicLennart Poettering
Previously, there was a chance of memory corruption, because when switching to the next DNS server we didn't care whether they linked list of DNS servers was still valid. Clean up lifecycle of the dns server logic: - When a DnsServer object is still in the linked list of DnsServers for a link or the manager, indicate so with a "linked" boolean field, and never follow the linked list if that boolean is not set. - When picking a DnsServer to use for a link ot manager, always explicitly take a reference. This also rearranges some logic, to make the tracking of dns servers by link and globally more alike.
2015-11-25resolved: split out all code dealing with /etc/resolv.conf into its own .c fileLennart Poettering
No functional changes.