mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-25 15:27:03 +01:00
dirmngr: Handle EAFNOSUPPORT at connect_server.
* dirmngr/http.c (connect_server): Skip server with EAFNOSUPPORT. -- Cherry-pick from master commit of: 109d16e8f644da97ed9c00e6f9010a53097f587a GnuPG-bug-id: 4977 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
68dd4f4398
commit
ce793fc2f8
@ -3005,6 +3005,15 @@ connect_server (const char *server, unsigned short port,
|
|||||||
sock = my_sock_new_for_addr (ai->addr, ai->socktype, ai->protocol);
|
sock = my_sock_new_for_addr (ai->addr, ai->socktype, ai->protocol);
|
||||||
if (sock == ASSUAN_INVALID_FD)
|
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,
|
err = gpg_err_make (default_errsource,
|
||||||
gpg_err_code_from_syserror ());
|
gpg_err_code_from_syserror ());
|
||||||
log_error ("error creating socket: %s\n", gpg_strerror (err));
|
log_error ("error creating socket: %s\n", gpg_strerror (err));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user