mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
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@g10code.com>
This commit is contained in:
parent
73c1a86ad9
commit
946faaff04
@ -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)];
|
||||
|
Loading…
x
Reference in New Issue
Block a user