1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

dirmngr: Mark hosts dead on ENETDOWN.

* dirmngr/ks-engine-hkp.c (handle_send_request_error): Take care of
ENETDOWN.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2017-01-11 16:43:30 +01:00
parent 09aeac41c9
commit 76fb2febde
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1132,10 +1132,14 @@ handle_send_request_error (gpg_error_t err, const char *request,
{
int retry = 0;
/* Fixme: Should we disable all hosts of a protocol family if a
* request for an address of that familiy returned ENETDOWN? */
switch (gpg_err_code (err))
{
case GPG_ERR_ECONNREFUSED:
case GPG_ERR_ENETUNREACH:
case GPG_ERR_ENETDOWN:
case GPG_ERR_UNKNOWN_HOST:
case GPG_ERR_NETWORK:
if (mark_host_dead (request) && *tries_left)
@ -1148,6 +1152,7 @@ handle_send_request_error (gpg_error_t err, const char *request,
log_info ("selecting a different host due to a timeout\n");
retry = 1;
}
break;
default:
break;