In bind_port(), let getaddrinfo() resolve localhost using whatever address family...
authorFabian Keil <fk@fabiankeil.de>
Tue, 15 Dec 2009 17:41:36 +0000 (17:41 +0000)
committerFabian Keil <fk@fabiankeil.de>
Tue, 15 Dec 2009 17:41:36 +0000 (17:41 +0000)
As Roland pointed out on privoxy-devel, explicitly asking
for AF_INET doesn't work reliably on GNU/Linux:
Message-ID: <20091213201632.GA3217@dinghy.sail.spinnaker.de>
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534735
https://bugs.launchpad.net/ubuntu/+source/privoxy/+bug/427625

jbsockets.c

index 3d4b296..5f5c4a2 100644 (file)
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.67 2009/09/10 14:53:34 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.68 2009/10/04 16:38:26 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -691,7 +691,7 @@ int bind_port(const char *hostnam, int portnum, jb_socket *pfd)
    }
 
    memset(&hints, 0, sizeof(struct addrinfo));
-   if ((hostnam == NULL) || !strcmpic(hostnam, "localhost"))
+   if (hostnam == NULL)
    {
       /*
        * XXX: This is a hack. The right thing to do