|
@@ -3216,3 +3216,77 @@ int wpas_driver_bss_selection(struct wpa_supplicant *wpa_s)
|
|
return wpa_s->conf->ap_scan == 2 ||
|
|
return wpa_s->conf->ap_scan == 2 ||
|
|
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_BSS_SELECTION);
|
|
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_BSS_SELECTION);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+#if defined(CONFIG_CTRL_IFACE) || defined(CONFIG_CTRL_IFACE_DBUS_NEW)
|
|
|
|
+int wpa_supplicant_ctrl_iface_ctrl_rsp_handle(struct wpa_supplicant *wpa_s,
|
|
|
|
+ struct wpa_ssid *ssid,
|
|
|
|
+ const char *field,
|
|
|
|
+ const char *value)
|
|
|
|
+{
|
|
|
|
+#ifdef IEEE8021X_EAPOL
|
|
|
|
+ struct eap_peer_config *eap = &ssid->eap;
|
|
|
|
+
|
|
|
|
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: response handle field=%s", field);
|
|
|
|
+ wpa_hexdump_ascii_key(MSG_DEBUG, "CTRL_IFACE: response value",
|
|
|
|
+ (const u8 *) value, os_strlen(value));
|
|
|
|
+
|
|
|
|
+ switch (wpa_supplicant_ctrl_req_from_string(field)) {
|
|
|
|
+ case WPA_CTRL_REQ_EAP_IDENTITY:
|
|
|
|
+ os_free(eap->identity);
|
|
|
|
+ eap->identity = (u8 *) os_strdup(value);
|
|
|
|
+ eap->identity_len = os_strlen(value);
|
|
|
|
+ eap->pending_req_identity = 0;
|
|
|
|
+ if (ssid == wpa_s->current_ssid)
|
|
|
|
+ wpa_s->reassociate = 1;
|
|
|
|
+ break;
|
|
|
|
+ case WPA_CTRL_REQ_EAP_PASSWORD:
|
|
|
|
+ os_free(eap->password);
|
|
|
|
+ eap->password = (u8 *) os_strdup(value);
|
|
|
|
+ eap->password_len = os_strlen(value);
|
|
|
|
+ eap->pending_req_password = 0;
|
|
|
|
+ if (ssid == wpa_s->current_ssid)
|
|
|
|
+ wpa_s->reassociate = 1;
|
|
|
|
+ break;
|
|
|
|
+ case WPA_CTRL_REQ_EAP_NEW_PASSWORD:
|
|
|
|
+ os_free(eap->new_password);
|
|
|
|
+ eap->new_password = (u8 *) os_strdup(value);
|
|
|
|
+ eap->new_password_len = os_strlen(value);
|
|
|
|
+ eap->pending_req_new_password = 0;
|
|
|
|
+ if (ssid == wpa_s->current_ssid)
|
|
|
|
+ wpa_s->reassociate = 1;
|
|
|
|
+ break;
|
|
|
|
+ case WPA_CTRL_REQ_EAP_PIN:
|
|
|
|
+ os_free(eap->pin);
|
|
|
|
+ eap->pin = os_strdup(value);
|
|
|
|
+ eap->pending_req_pin = 0;
|
|
|
|
+ if (ssid == wpa_s->current_ssid)
|
|
|
|
+ wpa_s->reassociate = 1;
|
|
|
|
+ break;
|
|
|
|
+ case WPA_CTRL_REQ_EAP_OTP:
|
|
|
|
+ os_free(eap->otp);
|
|
|
|
+ eap->otp = (u8 *) os_strdup(value);
|
|
|
|
+ eap->otp_len = os_strlen(value);
|
|
|
|
+ os_free(eap->pending_req_otp);
|
|
|
|
+ eap->pending_req_otp = NULL;
|
|
|
|
+ eap->pending_req_otp_len = 0;
|
|
|
|
+ break;
|
|
|
|
+ case WPA_CTRL_REQ_EAP_PASSPHRASE:
|
|
|
|
+ os_free(eap->private_key_passwd);
|
|
|
|
+ eap->private_key_passwd = (u8 *) os_strdup(value);
|
|
|
|
+ eap->pending_req_passphrase = 0;
|
|
|
|
+ if (ssid == wpa_s->current_ssid)
|
|
|
|
+ wpa_s->reassociate = 1;
|
|
|
|
+ break;
|
|
|
|
+ default:
|
|
|
|
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: Unknown field '%s'", field);
|
|
|
|
+ return -1;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return 0;
|
|
|
|
+#else /* IEEE8021X_EAPOL */
|
|
|
|
+ wpa_printf(MSG_DEBUG, "CTRL_IFACE: IEEE 802.1X not included");
|
|
|
|
+ return -1;
|
|
|
|
+#endif /* IEEE8021X_EAPOL */
|
|
|
|
+}
|
|
|
|
+#endif /* CONFIG_CTRL_IFACE || CONFIG_CTRL_IFACE_DBUS_NEW */
|