summaryrefslogtreecommitdiffstats
path: root/src/nss-resolve
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-04-11 11:06:40 +0200
committerLennart Poettering <lennart@poettering.net>2019-04-11 11:13:11 +0200
commit8baaf650ef68a7def4f867e6ca3ff606783ea42f (patch)
treefea05455a61a81d7894f1fe440120989760af33a /src/nss-resolve
parentnss-resolve: simplify condition (diff)
downloadsystemd-8baaf650ef68a7def4f867e6ca3ff606783ea42f.tar.xz
systemd-8baaf650ef68a7def4f867e6ca3ff606783ea42f.zip
nss-resolve: list more errors as cause for fallback
If dbus-daemon kicks us from the bus or hangs, we should fallback too. Fixes: #12203
Diffstat (limited to 'src/nss-resolve')
-rw-r--r--src/nss-resolve/nss-resolve.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index 113b0b1ee3..ac5fff523b 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -26,7 +26,9 @@ static bool bus_error_shall_fallback(sd_bus_error *e) {
return sd_bus_error_has_name(e, SD_BUS_ERROR_SERVICE_UNKNOWN) ||
sd_bus_error_has_name(e, SD_BUS_ERROR_NAME_HAS_NO_OWNER) ||
sd_bus_error_has_name(e, SD_BUS_ERROR_NO_REPLY) ||
- sd_bus_error_has_name(e, SD_BUS_ERROR_ACCESS_DENIED);
+ sd_bus_error_has_name(e, SD_BUS_ERROR_ACCESS_DENIED) ||
+ sd_bus_error_has_name(e, SD_BUS_ERROR_DISCONNECTED) ||
+ sd_bus_error_has_name(e, SD_BUS_ERROR_TIMEOUT);
}
static int count_addresses(sd_bus_message *m, int af, const char **canonical) {