From 391445d8ab32dfeb9d6d71b8726dd4a4c5b72506 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Wed, 6 Aug 2025 07:28:09 +0000 Subject: [PATCH] Revert r1914045, since the new -o option duplicates the -B option. Thread: https://lists.apache.org/thread/w26fk0m0r52lys1wxwn11b862vc1y631 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927630 13f79535-47bb-0310-9956-ffa450edef68 --- docs/man/ab.1 | 3 --- support/ab.c | 16 +--------------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/docs/man/ab.1 b/docs/man/ab.1 index 64d5865fc3a..e64e02503f2 100644 --- a/docs/man/ab.1 +++ b/docs/man/ab.1 @@ -136,9 +136,6 @@ String to use as attributes for \fB\fR\&. Attributes are inserted \fB-attributes\fR\fR String to use as attributes for \fB\fR\&. .TP diff --git a/support/ab.c b/support/ab.c index a7d20f0e11f..e02cd6841fb 100644 --- a/support/ab.c +++ b/support/ab.c @@ -435,7 +435,6 @@ int bind_count = 0; const char **bind_hosts; apr_sockaddr_t **bind_addrs; apr_port_t connectport; -char *src_address; const char *gnuplot; /* GNUplot file */ const char *csvperc; /* CSV Percentile file */ const char *fullurl; @@ -1614,7 +1613,6 @@ static void start_connection(struct connection * c) { struct worker *worker = c->worker; apr_status_t rv; - apr_sockaddr_t *from; if (!worker_can_connect(worker)) { return; @@ -1680,14 +1678,6 @@ static void start_connection(struct connection * c) } } - if (src_address) { - if ((rv = apr_sockaddr_info_get(&from, src_address, destsa->family, - 0, 0, c->ctx)) != APR_SUCCESS) - graceful_strerror("src_address get", rv); - if ((rv = apr_socket_bind(c->aprsock, from)) != APR_SUCCESS) - graceful_strerror("src_address bind", rv); - } - c->read = 0; c->bread = 0; c->length = 0; @@ -2800,7 +2790,6 @@ static void usage(const char *progname) fprintf(stderr, " -P attribute Add Basic Proxy Authentication, the attributes\n"); fprintf(stderr, " are a colon separated username and password.\n"); fprintf(stderr, " -X proxy:port Proxyserver and port number to use\n"); - fprintf(stderr, " -o src_address Set the local source address\n"); fprintf(stderr, " -V Print version number and exit\n"); fprintf(stderr, " -k Use HTTP KeepAlive feature\n"); fprintf(stderr, " -d Do not show percentiles served table.\n"); @@ -3041,7 +3030,7 @@ int main(int argc, const char * const argv[]) #endif apr_getopt_init(&opt, cntxt, argc, argv); - while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwiIx:y:z:C:H:P:A:g:X:de:SqQDB:m:R:o:" + while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwiIx:y:z:C:H:P:A:g:X:de:SqQDB:m:R:" #if APR_HAS_THREADS "W:" #endif @@ -3067,9 +3056,6 @@ int main(int argc, const char * const argv[]) case 'k': keepalive = 1; break; - case 'o': - src_address = strdup(opt_arg); - break; case 'q': heartbeatres = 0; break; -- 2.47.3