[Pkg-gnupg-commit] [gnupg2] 165/241: dirmngr: Fix SRV record lookups when using the system resolver.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Wed Dec 9 20:32:11 UTC 2015
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gnupg2.
commit 946faaff04f3340ed6db9e89c5036dc5f9beca6a
Author: Justus Winter <justus at g10code.com>
Date: Mon Nov 23 15:46:33 2015 +0100
dirmngr: Fix SRV record lookups when using the system resolver.
* dirmngr/dns-stuff.c (getsrv): Fix error handling.
--
This fixes hkp server pools not using SRV records.
Signed-off-by: Justus Winter <justus at g10code.com>
---
dirmngr/dns-stuff.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 2af4dec..694c04b 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -1086,10 +1086,10 @@ getsrv (const char *name,struct srventry **list)
return -1;
r = res_query (name, C_IN, T_SRV, answer, sizeof answer);
- if (r < sizeof (HEADER) || r > sizeof answer)
- return -1;
if (header->rcode != NOERROR || !(count=ntohs (header->ancount)))
return 0; /* Error or no record found. */
+ if (r < sizeof (HEADER) || r > sizeof answer)
+ return -1;
emsg = &answer[r];
pt = &answer[sizeof(HEADER)];
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list