summaryrefslogtreecommitdiff
path: root/src/libwpactrl/wpactrl_associate.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-12-15 23:10:02 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-12-15 23:10:02 +0000
commitc3fa11b88d12c9f931ea0515f3051565d2ff915d (patch)
treed19e3e6d3ca22d3ce482b5eae52cf7954d6021b4 /src/libwpactrl/wpactrl_associate.c
parent3c54eec70a6e3d422fbcb9c06cceab4b9b0f0ea5 (diff)
downloadbcnm-c3fa11b88d12c9f931ea0515f3051565d2ff915d.tar.xz
Apply awilfox's wpactrl_associate() fixes
Diffstat (limited to 'src/libwpactrl/wpactrl_associate.c')
-rw-r--r--src/libwpactrl/wpactrl_associate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libwpactrl/wpactrl_associate.c b/src/libwpactrl/wpactrl_associate.c
index 59900d6..0f1bd2e 100644
--- a/src/libwpactrl/wpactrl_associate.c
+++ b/src/libwpactrl/wpactrl_associate.c
@@ -14,9 +14,10 @@ int wpactrl_associate (wpactrl_t *a, char const *ssid, char const *psk, tain_t *
if (!wpactrl_addnetwork(a, &id, stamp)) goto err ;
}
+ if (wpactrl_setnetworkoption(a, id, "ssid", ssid, stamp) != WPA_OK) goto err ;
if (psk)
{
- if (wpactrl_setnetworkoption(a, id, "key_mgmt", "WPA-PSK WPA-PSK-SHA256", stamp) != WPA_OK
+ if (wpactrl_setnetworkoption(a, id, "key_mgmt", "WPA-PSK", stamp) != WPA_OK
|| wpactrl_setnetworkoption(a, id, "mem_only_psk", "1", stamp) != WPA_OK
|| wpactrl_setnetworkoption(a, id, "psk", psk, stamp) != WPA_OK) goto err ;
}