Make the combination of -B and -P but not --cport work
The case where we should have been binding the client sockets to ephemeral ports at a specific address for parallel tests was broken. Fixes #239 Submitted by: @jfitzgibbon
This commit is contained in:
parent
20bd2a6efa
commit
6bd4e258d0
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* iperf, Copyright (c) 2014, The Regents of the University of
|
* iperf, Copyright (c) 2014, 2015, The Regents of the University of
|
||||||
* California, through Lawrence Berkeley National Laboratory (subject
|
* California, through Lawrence Berkeley National Laboratory (subject
|
||||||
* to receipt of any required approvals from the U.S. Dept. of
|
* to receipt of any required approvals from the U.S. Dept. of
|
||||||
* Energy). All rights reserved.
|
* Energy). All rights reserved.
|
||||||
@ -53,7 +53,9 @@ iperf_create_streams(struct iperf_test *test)
|
|||||||
int orig_bind_port = test->bind_port;
|
int orig_bind_port = test->bind_port;
|
||||||
for (i = 0; i < test->num_streams; ++i) {
|
for (i = 0; i < test->num_streams; ++i) {
|
||||||
|
|
||||||
test->bind_port = orig_bind_port + i;
|
test->bind_port = orig_bind_port;
|
||||||
|
if (orig_bind_port)
|
||||||
|
test->bind_port += i;
|
||||||
if ((s = test->protocol->connect(test)) < 0)
|
if ((s = test->protocol->connect(test)) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user