summaryrefslogtreecommitdiffstats
path: root/dirmngr
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2020-07-13 03:00:58 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2020-07-13 03:03:09 +0200
commit109d16e8f644da97ed9c00e6f9010a53097f587a (patch)
tree07f8c526f64a568ccdcdadf5470a1cb55698ca4c /dirmngr
parentgpg: For decryption, support use of a key with no 'encrypt' usage. (diff)
downloadgnupg2-109d16e8f644da97ed9c00e6f9010a53097f587a.tar.xz
gnupg2-109d16e8f644da97ed9c00e6f9010a53097f587a.zip
dirmngr: Handle EAFNOSUPPORT at connect_server.
* dirmngr/http.c (connect_server): Skip server with EAFNOSUPPORT. -- GnuPG-bug-id: 4977 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'dirmngr')
-rw-r--r--dirmngr/http.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c
index f26675f9b..50b9b732b 100644
--- a/dirmngr/http.c
+++ b/dirmngr/http.c
@@ -3005,6 +3005,15 @@ connect_server (ctrl_t ctrl, const char *server, unsigned short port,
sock = my_sock_new_for_addr (ai->addr, ai->socktype, ai->protocol);
if (sock == ASSUAN_INVALID_FD)
{
+ if (errno == EAFNOSUPPORT)
+ {
+ if (ai->family == AF_INET)
+ v4_valid = 0;
+ if (ai->family == AF_INET6)
+ v6_valid = 0;
+ continue;
+ }
+
err = gpg_err_make (default_errsource,
gpg_err_code_from_syserror ());
log_error ("error creating socket: %s\n", gpg_strerror (err));