[Pkg-gnupg-commit] [gnupg2] 166/241: dirmngr: Fix http lookups when libadns is used.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 9 20:32:12 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 b75e1b3d8b1643640d046f7f8e89adf5b1caa7a3
Author: Justus Winter <justus at g10code.com>
Date:   Mon Nov 23 15:41:36 2015 +0100

    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 at g10code.com>
---
 dirmngr/dns-stuff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index 694c04b..b3ad9bc 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -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;

-- 
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