diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-20 21:28:22 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-25 15:59:40 +0100 |
commit | edbcc1fdd94355c5cf22263ba2c1cfa4ec2eb010 (patch) | |
tree | 7fe83782671de558758ce370f0da0d4efa48f085 /src/resolve/resolved-bus.c | |
parent | 6955a3ba9dc5d36487724878333a5745987e6656 (diff) |
resolve: generate a nice clean error when clients try to resolve a name when the network is down
Diffstat (limited to 'src/resolve/resolved-bus.c')
-rw-r--r-- | src/resolve/resolved-bus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c index 9110ea52a6..66c2c25dec 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -59,6 +59,9 @@ static int reply_query_state(DnsQuery *q) { case DNS_TRANSACTION_RR_TYPE_UNSUPPORTED: return sd_bus_reply_method_errorf(q->request, BUS_ERROR_RR_TYPE_UNSUPPORTED, "Server does not support requested resource record type"); + case DNS_TRANSACTION_NETWORK_DOWN: + return sd_bus_reply_method_errorf(q->request, BUS_ERROR_NETWORK_DOWN, "Network is down"); + case DNS_TRANSACTION_RCODE_FAILURE: { _cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL; |