From cc66108253c58583d6bad3d1e2da2b004701d0f0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 26 Apr 2018 12:28:53 +0200 Subject: dirmngr: Fix handling of CNAMEed keyserver pools. * dirmngr/ks-engine-hkp.c (map_host): Don't use the cname for HTTPHOST. * dirmngr/server.c (make_keyserver_item): Map keys.gnupg.net. -- For a description of the problem see the comment in make_keyserver_item. GnuPG-bug-id: 3755 Signed-off-by: Werner Koch --- dirmngr/ks-engine-hkp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'dirmngr/ks-engine-hkp.c') diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index a9bb93666..eba7a1a48 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -583,7 +583,7 @@ map_host (ctrl_t ctrl, const char *name, const char *srvtag, int force_reselect, /* Deal with the pool name before selecting a host. */ if (r_httphost) { - *r_httphost = xtrystrdup (hi->cname? hi->cname : hi->name); + *r_httphost = xtrystrdup (hi->name); if (!*r_httphost) return gpg_error_from_syserror (); } -- cgit From 5789afc840cf79ba2a8cebd9d772ef9c3868c5e9 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 26 Apr 2018 12:39:59 +0200 Subject: dirmngr: Lower the dead host resurrection time to 1.5h * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): Decrease. (INITIAL_HOSTTABLE_SIZE): Increase because the old values was likely for development. Signed-off-by: Werner Koch --- NEWS | 2 ++ dirmngr/ks-engine-hkp.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'dirmngr/ks-engine-hkp.c') diff --git a/NEWS b/NEWS index ca84e2089..e5f088b18 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ Noteworthy changes in version 2.2.7 (unreleased) * dirmngr: Fix a CNAME problem with pools and TLS. Also use a fixed mapping of keys.gnupg.net to sks-keyservers.net. [#3755] + * dirmngr: Try resurrecting dead hosts earlier (from 3 to 1.5 hours). + Noteworthy changes in version 2.2.6 (2018-04-09) ------------------------------------------------ diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index eba7a1a48..32840e68e 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -55,7 +55,7 @@ /* Number of seconds after a host is marked as resurrected. */ -#define RESURRECT_INTERVAL (3600*3) /* 3 hours */ +#define RESURRECT_INTERVAL (3600+1800) /* 1.5 hours */ /* To match the behaviour of our old gpgkeys helper code we escape more characters than actually needed. */ @@ -110,7 +110,7 @@ static hostinfo_t *hosttable; static int hosttable_size; /* The number of host slots we initially allocate for HOSTTABLE. */ -#define INITIAL_HOSTTABLE_SIZE 10 +#define INITIAL_HOSTTABLE_SIZE 50 /* Create a new hostinfo object, fill in NAME and put it into -- cgit