aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/dns.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2018-07-02 01:37:49 +0000
committerNIIBE Yutaka <[email protected]>2018-07-02 01:47:38 +0000
commitcca92ca5348999a3564dd54d7b0a103cc9e7640c (patch)
treef25a65af4e2b1ae0ebfb2c0a0c0a1fdc832ff570 /dirmngr/dns.c
parentlibdns: Let kernel to decide the local port. (diff)
downloadgnupg-cca92ca5348999a3564dd54d7b0a103cc9e7640c.tar.gz
gnupg-cca92ca5348999a3564dd54d7b0a103cc9e7640c.zip
libdns: For SOCKS connection, just fails.
* dirmngr/dns.c (dns_res_exec): If it's DNS_SO_SOCKS_CONN, don't iterate to other server, but return the error immediately. -- Cherry picked from master commit: 1aacd12471935a354cfd85ee1805edc7eb16e6c5 In the function libdns_switch_port_p in dns-stuff.c, this patch allows to fallback using TOR_PORT2 correctly. Fixes-commit: bcdbf8b8ebe9d61160e0b007dabe1b6462ffbc93 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'dirmngr/dns.c')
-rw-r--r--dirmngr/dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dirmngr/dns.c b/dirmngr/dns.c
index f82ed26cf..77f83f437 100644
--- a/dirmngr/dns.c
+++ b/dirmngr/dns.c
@@ -8846,7 +8846,7 @@ exec:
dgoto(R->sp, DNS_R_FOREACH_A);
error = dns_so_check(&R->so);
- if (error == ECONNREFUSED)
+ if (R->so.state != DNS_SO_SOCKS_CONN && error == ECONNREFUSED)
dgoto(R->sp, DNS_R_FOREACH_A);
else if (error)
goto error;