1 --- httpd-2.4.35/docs/man/ab.1.bak 2018-10-21 16:10:11.161024133 +0000
2 +++ httpd-2.4.35/docs/man/ab.1 2018-10-21 16:11:25.689793452 +0000
4 \fB-X \fIproxy\fR[:\fIport\fR]\fR
5 Use a proxy server for the requests\&.
7 +\fB-o \fIsrc_address\fR\fR
8 +Set the local source address\&.
10 \fB-y \fI<tr>-attributes\fR\fR
11 String to use as attributes for \fB<tr>\fR\&.
13 --- httpd-2.4.33/support/ab.c.ab_source_address.droplet 2018-03-16 01:02:58.000000000 +0200
14 +++ httpd-2.4.33/support/ab.c 2018-03-27 10:39:44.792971820 +0300
16 const char *connecthost;
18 apr_port_t connectport;
20 const char *gnuplot; /* GNUplot file */
21 const char *csvperc; /* CSV Percentile file */
24 static void start_connect(struct connection * c)
27 + apr_sockaddr_t *from;
29 if (!(started < requests))
31 @@ -1348,6 +1350,14 @@
36 + if ((rv = apr_sockaddr_info_get(&from, src_address, destsa->family,
37 + 0, 0, c->ctx)) != APR_SUCCESS)
38 + apr_err("src_address get", rv);
39 + if ((rv = apr_socket_bind(c->aprsock, from)) != APR_SUCCESS)
40 + apr_err("src_address bind", rv);
43 c->start = lasttime = apr_time_now();
47 fprintf(stderr, " -P attribute Add Basic Proxy Authentication, the attributes\n");
48 fprintf(stderr, " are a colon separated username and password.\n");
49 fprintf(stderr, " -X proxy:port Proxyserver and port number to use\n");
50 + fprintf(stderr, " -o src_address Set the local source address\n");
51 fprintf(stderr, " -V Print version number and exit\n");
52 fprintf(stderr, " -k Use HTTP KeepAlive feature\n");
53 fprintf(stderr, " -d Do not show percentiles served table.\n");
55 myhost = NULL; /* 0.0.0.0 or :: */
57 apr_getopt_init(&opt, cntxt, argc, argv);
58 - while ((status = apr_getopt(opt, "n:c:t:s:b:T:p:u:v:lrkVhwiIx:y:z:C:H:P:A:g:X:de:SqB:m:"
59 + while ((status = apr_getopt(opt, "o:n:c:t:s:b:T:p:u:v:lrkVhwiIx:y:z:C:H:P:A:g:X:de:SqB:m:"
68 + src_address = strdup(optarg);