mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +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:
parent
946faaff04
commit
b75e1b3d8b
@ -253,7 +253,6 @@ resolve_name_adns (const char *name, unsigned short port,
|
|||||||
adns_answer *answer = NULL;
|
adns_answer *answer = NULL;
|
||||||
int count;
|
int count;
|
||||||
|
|
||||||
(void)port;
|
|
||||||
(void)want_family;
|
(void)want_family;
|
||||||
|
|
||||||
*r_dai = NULL;
|
*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->protocol = want_socktype == SOCK_STREAM? IPPROTO_TCP : IPPROTO_UDP;
|
||||||
dai->addrlen = len;
|
dai->addrlen = len;
|
||||||
memcpy (dai->addr, &addr->addr.sa, len);
|
memcpy (dai->addr, &addr->addr.sa, len);
|
||||||
|
((struct sockaddr_in *) dai->addr)->sin_port = htons (port);
|
||||||
dai->next = daihead;
|
dai->next = daihead;
|
||||||
daihead = dai;
|
daihead = dai;
|
||||||
err = 0;
|
err = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user