From: Jeff Trawick Date: Sat, 21 Jul 2012 17:39:38 +0000 (+0000) Subject: When -B is specified, search for a host address in the X-Git-Tag: 2.5.0-alpha~6609 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=661d00528c24b0d1a3aa261f8242a01f70fc947a;p=thirdparty%2Fapache%2Fhttpd.git When -B is specified, search for a host address in the same family as the specified outbound interface. If impossible, fail at name resolution instead of bind(). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1364133 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/ab.c b/support/ab.c index d2b1a986f93..9c968f1eb1f 100644 --- a/support/ab.c +++ b/support/ab.c @@ -1700,7 +1700,9 @@ static void test(void) } /* This too */ - if ((rv = apr_sockaddr_info_get(&destsa, connecthost, APR_UNSPEC, connectport, 0, cntxt)) + if ((rv = apr_sockaddr_info_get(&destsa, connecthost, + myhost ? mysa->family : APR_UNSPEC, + connectport, 0, cntxt)) != APR_SUCCESS) { char buf[120]; apr_snprintf(buf, sizeof(buf),