3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-29 05:39:24 +01:00

eap-wsc: In WSC-R read UUID-E from settings

The intent was to read the UUID-E from the settings rather than generate
it from the enrollee's MAC because it needs to match the UUID-E from
enrolee's Probe Requests, fix this.  The UUID-E supplied in the unit
test was being ignored but the test still passed because the supplied
UUID-E was generated the same way we generated it in eap-wsc.c.
This commit is contained in:
Andrew Zaborowski 2020-08-27 20:14:45 +02:00 committed by Denis Kenzior
parent e4b1d4202f
commit 7713e00992

View File

@ -1871,9 +1871,6 @@ static struct eap_wsc_state *eap_wsc_new_common(struct l_settings *settings,
if (!util_string_to_address(v, wsc->m1->addr))
goto err;
if (!wsc_uuid_from_addr(wsc->m1->addr, wsc->m1->uuid_e))
goto err;
if (!l_settings_get_uint(settings, "WSC", "ConfigurationMethods", &u32))
u32 = WSC_CONFIGURATION_METHOD_VIRTUAL_DISPLAY_PIN;
@ -1988,6 +1985,9 @@ static bool eap_wsc_load_settings(struct eap_state *eap,
WSC_ENCRYPTION_TYPE_AES_TKIP;
wsc->m1->connection_type_flags = WSC_CONNECTION_TYPE_ESS;
if (!wsc_uuid_from_addr(wsc->m1->addr, wsc->m1->uuid_e))
goto err;
if (!load_device_data(settings,
wsc->m1->manufacturer,
wsc->m1->model_name,
@ -2041,6 +2041,9 @@ static bool eap_wsc_r_load_settings(struct eap_state *eap,
if (!wsc)
return false;
if (!load_hexencoded(settings, "UUID-E", wsc->m1->uuid_e, 16))
goto err;
if (!load_hexencoded(settings, "UUID-R", wsc->m2->uuid_r, 16))
goto err;