]> granicus.if.org Git - apache/commitdiff
When -B is specified, search for a host address in the
authorJeff Trawick <trawick@apache.org>
Sat, 21 Jul 2012 17:39:38 +0000 (17:39 +0000)
committerJeff Trawick <trawick@apache.org>
Sat, 21 Jul 2012 17:39:38 +0000 (17:39 +0000)
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

support/ab.c

index d2b1a986f9307665527f6c958f07aee75b4dd4d8..9c968f1eb1f609128f933382db3c56cc19f44edb 100644 (file)
@@ -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),