Interworking: Add NULL checking for EAP name in phase2/autheap parameter
Add NULL checking for EAP name. If it is NULL, do not add the phase2 parameter autheap. This should not happen in practice due to earlier checks for credential matching, but if there is a code path that would allow this to be set, it is better to skip setting of the invalid value and allow automatic selection of the Phase 2 parameters. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
9ddba3a309
commit
8d968351a0
1 changed files with 4 additions and 3 deletions
|
@ -1771,9 +1771,10 @@ int interworking_connect(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
|
||||||
switch (eap->method) {
|
switch (eap->method) {
|
||||||
case EAP_TYPE_TTLS:
|
case EAP_TYPE_TTLS:
|
||||||
if (eap->inner_method) {
|
if (eap->inner_method) {
|
||||||
os_snprintf(buf, sizeof(buf), "\"autheap=%s\"",
|
name = eap_get_name(EAP_VENDOR_IETF, eap->inner_method);
|
||||||
eap_get_name(EAP_VENDOR_IETF,
|
if (!name)
|
||||||
eap->inner_method));
|
goto fail;
|
||||||
|
os_snprintf(buf, sizeof(buf), "\"autheap=%s\"", name);
|
||||||
if (wpa_config_set(ssid, "phase2", buf, 0) < 0)
|
if (wpa_config_set(ssid, "phase2", buf, 0) < 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue