You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2012/07/21 19:39:38 UTC

svn commit: r1364133 - /httpd/httpd/trunk/support/ab.c

Author: trawick
Date: Sat Jul 21 17:39:38 2012
New Revision: 1364133

URL: http://svn.apache.org/viewvc?rev=1364133&view=rev
Log:
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().

Modified:
    httpd/httpd/trunk/support/ab.c

Modified: httpd/httpd/trunk/support/ab.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/ab.c?rev=1364133&r1=1364132&r2=1364133&view=diff
==============================================================================
--- httpd/httpd/trunk/support/ab.c (original)
+++ httpd/httpd/trunk/support/ab.c Sat Jul 21 17:39:38 2012
@@ -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),