mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
Merge "qcacld-3.0: Fix the max length of keyname nai" into wlan-cld3.driver.lnx.2.0-dev
This commit is contained in:
commit
6babd6f958
2 changed files with 16 additions and 3 deletions
|
|
@ -176,7 +176,7 @@ struct cds_config_info {
|
|||
#ifdef WLAN_FEATURE_FILS_SK
|
||||
#define MAX_PMK_LEN 48
|
||||
#define MAX_PMKID_LEN 16
|
||||
#define FILS_MAX_KEYNAME_NAI_LENGTH 255
|
||||
#define FILS_MAX_KEYNAME_NAI_LENGTH 253
|
||||
#define FILS_MAX_REALM_LEN 255
|
||||
#define FILS_MAX_RRK_LENGTH 64
|
||||
#define FILS_MAX_RIK_LENGTH FILS_MAX_RRK_LENGTH
|
||||
|
|
|
|||
|
|
@ -16040,7 +16040,7 @@ static int wlan_hdd_cfg80211_set_fils_config(struct hdd_adapter *adapter,
|
|||
auth_type = wlan_hdd_get_fils_auth_type(req->auth_type);
|
||||
if (auth_type == eSIR_DONOT_USE_AUTH_TYPE) {
|
||||
hdd_err("invalid auth type for fils %d", req->auth_type);
|
||||
return -EINVAL;
|
||||
goto fils_conn_fail;
|
||||
}
|
||||
|
||||
hdd_debug("seq=%d auth=%d lengths: user=%zu rrk=%zu realm=%zu",
|
||||
|
|
@ -16051,7 +16051,7 @@ static int wlan_hdd_cfg80211_set_fils_config(struct hdd_adapter *adapter,
|
|||
req->fils_erp_realm_len > WMI_FILS_MAX_REALM_LENGTH ||
|
||||
req->fils_erp_username_len > WMI_FILS_MAX_USERNAME_LENGTH) {
|
||||
hdd_err("FILS info length limit exceeded");
|
||||
return -EINVAL;
|
||||
goto fils_conn_fail;
|
||||
}
|
||||
|
||||
roam_profile->fils_con_info->is_fils_connection = true;
|
||||
|
|
@ -16077,6 +16077,12 @@ static int wlan_hdd_cfg80211_set_fils_config(struct hdd_adapter *adapter,
|
|||
req->fils_erp_realm_len;
|
||||
hdd_debug("key_nai_length = %d",
|
||||
roam_profile->fils_con_info->key_nai_length);
|
||||
if (roam_profile->fils_con_info->key_nai_length >
|
||||
FILS_MAX_KEYNAME_NAI_LENGTH) {
|
||||
hdd_err("Do not allow FILS conn due to excess NAI Length %d",
|
||||
roam_profile->fils_con_info->key_nai_length);
|
||||
goto fils_conn_fail;
|
||||
}
|
||||
if (req->fils_erp_username_len) {
|
||||
buf = roam_profile->fils_con_info->keyname_nai;
|
||||
qdf_mem_copy(buf,
|
||||
|
|
@ -16090,6 +16096,13 @@ static int wlan_hdd_cfg80211_set_fils_config(struct hdd_adapter *adapter,
|
|||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fils_conn_fail:
|
||||
if (roam_profile->fils_con_info) {
|
||||
qdf_mem_free(roam_profile->fils_con_info);
|
||||
roam_profile->fils_con_info = NULL;
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static bool wlan_hdd_is_akm_suite_fils(uint32_t key_mgmt)
|
||||
|
|
|
|||
Loading…
Reference in a new issue