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.
Этот коммит содержится в:
родитель
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;
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user