1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

dirmngr: Fix http lookups when libadns is used.

* dirmngr/dns-stuff.c (resolve_name_adns): Fill in the port.
--
Previously, sin_port was set to zero, making connect fail.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2015-11-23 15:41:36 +01:00
parent 946faaff04
commit b75e1b3d8b

View File

@ -253,7 +253,6 @@ resolve_name_adns (const char *name, unsigned short port,
adns_answer *answer = NULL;
int count;
(void)port;
(void)want_family;
*r_dai = NULL;
@ -319,6 +318,7 @@ resolve_name_adns (const char *name, unsigned short port,
dai->protocol = want_socktype == SOCK_STREAM? IPPROTO_TCP : IPPROTO_UDP;
dai->addrlen = len;
memcpy (dai->addr, &addr->addr.sa, len);
((struct sockaddr_in *) dai->addr)->sin_port = htons (port);
dai->next = daihead;
daihead = dai;
err = 0;