1
1

fix: Fix a bug in --bidir option processing (#903)

If --bidir option was passed before --client option on command line,
the latter would override ipt->mode parameter of the test back to SENDER
or RECEIVER making the test hang during execution.

Fix this by checking if ipt->bidirectional was set to true in
iperf_set_test_role() function.
Этот коммит содержится в:
Sergey Nemov 2019-08-19 23:29:27 +02:00 коммит произвёл Bruce A. Mah
родитель d0d77e9519
Коммит 9c69a85088

Просмотреть файл

@ -470,7 +470,9 @@ iperf_set_test_role(struct iperf_test *ipt, char role)
{
ipt->role = role;
if (!ipt->reverse) {
if (role == 'c')
if (ipt->bidirectional)
ipt->mode = BIDIRECTIONAL;
else if (role == 'c')
ipt->mode = SENDER;
else if (role == 's')
ipt->mode = RECEIVER;