]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: change error handling for manager_etc_hosts_read() 9770/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Aug 2018 10:41:54 +0000 (12:41 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Aug 2018 10:45:54 +0000 (12:45 +0200)
commitbe19cdf31c8665f149f34617cab7104832e3a9d1
tree0f8831737e6c7581b07048b7c16c075d12ecb7ba
parentfd373593ba9b7c8426529623a803086038db4474
resolved: change error handling for manager_etc_hosts_read()

The choice what errors to ignore is left to the caller, and the caller is
changed to ignore all errors.

On error, previously read data is kept. So if e.g. an oom error happens, we
will continue to return slightly stale data instead of pretending we have no
entries for the given address. I think that's better, for example when
/etc/hosts contains some important overrides that external DNS should not be
queried for.
src/resolve/resolved-etc-hosts.c