mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
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>
This commit is contained in:
parent
31ae0718ba
commit
109d16e8f6
@ -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);
|
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