mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
qca-wifi-7: hostapd: fix missing PSK assignment for EMPSK
When using psk2-radius in combination with enhanced MPSK, the passphrase was not properly propagated to user scripts via the ucode interface, because the PSK field was not set in the connected station context. This patch fixes that by copying the passphrase into the psk field. Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
This commit is contained in:
committed by
John Crispin
parent
29739ebd13
commit
f17314a2d3
@@ -785,6 +785,7 @@ int hostapd_ucode_sta_auth(struct hostapd_data *hapd, struct sta_info *sta)
|
||||
|
||||
void hostapd_ucode_sta_connected(struct hostapd_data *hapd, struct sta_info *sta)
|
||||
{
|
||||
struct hostapd_sta_wpa_psk_short *psk = sta->psk;
|
||||
char addr[sizeof(MACSTR)];
|
||||
uc_value_t *val, *cur;
|
||||
int ret = 0;
|
||||
@@ -801,6 +802,8 @@ void hostapd_ucode_sta_connected(struct hostapd_data *hapd, struct sta_info *sta
|
||||
val = ucv_object_new(vm);
|
||||
if (sta->psk_idx)
|
||||
ucv_object_add(val, "psk_idx", ucv_int64_new(sta->psk_idx - 1));
|
||||
if (sta->psk)
|
||||
ucv_object_add(val, "psk", ucv_string_new(sta->psk->passphrase));
|
||||
uc_value_push(ucv_get(val));
|
||||
|
||||
val = wpa_ucode_call(3);
|
||||
|
||||
Reference in New Issue
Block a user