dirmngr cygwin resolv.conf

NIIBE Yutaka gniibe at fsij.org
Wed Jul 4 09:11:15 CEST 2018


Hello,

john doe <johndoe65534 at mail.com> wrote:
> I'm willing to confirm that but I'm not sure how I would do that!?

I am considering a patch like following.  If you can build GnuPG for
Cygwin, you can try.  Or, you can ask Cygwin's package maintainer for
GnuPG.

The patch is: Don't try to look the error code, but fallback TOR_PORT2
always.

==========================
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index ffac816f9..88a4fce5c 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -735,13 +735,12 @@ libdns_res_open (struct dns_resolver **r_res)
 static int
 libdns_switch_port_p (gpg_error_t err)
 {
-  if (tor_mode && gpg_err_code (err) == GPG_ERR_ECONNREFUSED
-      && libdns_tor_port == TOR_PORT)
+  if (tor_mode && libdns_tor_port == TOR_PORT)
     {
       /* Switch port and try again.  */
       if (opt_debug)
-        log_debug ("dns: switching from SOCKS port %d to %d\n",
-                   TOR_PORT, TOR_PORT2);
+        log_debug ("dns: switching from SOCKS port %d to %d (%s)\n",
+                   TOR_PORT, TOR_PORT2, gpg_strerror (err));
       libdns_tor_port = TOR_PORT2;
       libdns_reinit_pending = 1;
       return 1;
-- 



More information about the Gnupg-users mailing list