Enable OWE PTK workaround when a specific group is not set
OWE PTK workaround needs to be enabled for all cases when configuring
OWE instead of only the cases that set a specific owe_group value. This
fixes an issue in cases where ECGroupID is not set, but the workaround
is needed.
Signed-off-by: Hu Wang <huw@codeaurora.org>
diff --git a/sta.c b/sta.c
index 450d7b3..d5b1736 100644
--- a/sta.c
+++ b/sta.c
@@ -2990,6 +2990,13 @@
if (set_network(ifname, id, "key_mgmt", "OWE") < 0)
return -2;
+ if (dut->owe_ptk_workaround &&
+ set_network(ifname, id, "owe_ptk_workaround", "1") < 0) {
+ sigma_dut_print(dut, DUT_MSG_ERROR,
+ "Failed to set owe_ptk_workaround to 1");
+ return -2;
+ }
+
val = get_param(cmd, "ECGroupID");
if (val && strcmp(val, "0") == 0) {
if (wpa_command(ifname,
@@ -2998,10 +3005,7 @@
"Failed to set OWE DH Param element override");
return -2;
}
- } else if (val &&
- (set_network(ifname, id, "owe_group", val) < 0 ||
- (dut->owe_ptk_workaround &&
- set_network(ifname, id, "owe_ptk_workaround", "1") < 0))) {
+ } else if (val && set_network(ifname, id, "owe_group", val) < 0) {
sigma_dut_print(dut, DUT_MSG_ERROR,
"Failed to set owe_group");
return -2;