From 661d00528c24b0d1a3aa261f8242a01f70fc947a Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Sat, 21 Jul 2012 17:39:38 +0000 Subject: [PATCH] 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 --- support/ab.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/support/ab.c b/support/ab.c index d2b1a986f9..9c968f1eb1 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), -- 2.50.0