summaryrefslogtreecommitdiffstats
path: root/src/resolve/resolved-resolv-conf.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* resolved: flush the global DNS cache if /etc/resolv.conf is touchedLennart Poettering2015-11-271-0/+9
| | | | | | | 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
* resolved: don't clear the server list too eagerlyLennart Poettering2015-11-271-12/+10
| | | | | | | 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.
* resolved: split out calls to compile full list of dns servers and search domainsLennart Poettering2015-11-251-62/+13
| | | | | Let's split this out from the resolv.conf parser, so that this becomes generically useful.
* resolved: unify DnsServer handling code between Link and ManagerLennart Poettering2015-11-251-3/+3
| | | | | | 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.
* resolved: add a generic DnsSearchDomain conceptLennart Poettering2015-11-251-9/+26
| | | | | | | | | | 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.
* resolved: rework dns server lifecycle logicLennart Poettering2015-11-251-10/+2
| | | | | | | | | | | | | | | | | | 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.
* resolved: split out all code dealing with /etc/resolv.conf into its own .c fileLennart Poettering2015-11-251-0/+306
No functional changes.