OSDN Git Service

Accumulative patch from commit dc013f1e37df3462085cf01a13f0c432f146ad7a
[android-x86/external-wpa_supplicant_8.git] / src / ap / ap_config.c
index fd2d4d5..922f564 100644 (file)
@@ -89,6 +89,8 @@ void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
 #endif /* CONFIG_IEEE80211R */
 
        bss->radius_das_time_window = 300;
+
+       bss->sae_anti_clogging_threshold = 5;
 }
 
 
@@ -158,13 +160,8 @@ struct hostapd_config * hostapd_config_defaults(void)
 
        conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED;
 
-#ifdef ANDROID_QCOM_WCN
-       conf->ieee80211n = 1;
-
-       /* Enable ieee80211d and set US as default country */
-       conf->ieee80211d = 1;
-       os_memcpy(conf->country, "US ", 3);
-#endif
+       conf->ap_table_max_size = 255;
+       conf->ap_table_expiration_time = 60;
 
        return conf;
 }
@@ -416,6 +413,7 @@ static void hostapd_config_free_bss(struct hostapd_bss_config *conf)
                user = user->next;
                hostapd_config_free_eap_user(prev_user);
        }
+       os_free(conf->eap_user_sqlite);
 
        os_free(conf->dump_log_name);
        os_free(conf->eap_req_id_text);
@@ -523,6 +521,8 @@ static void hostapd_config_free_bss(struct hostapd_bss_config *conf)
 #endif /* CONFIG_HS20 */
 
        wpabuf_free(conf->vendor_elements);
+
+       os_free(conf->sae_groups);
 }
 
 
@@ -627,57 +627,3 @@ const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,
 
        return NULL;
 }
-
-
-const struct hostapd_eap_user *
-hostapd_get_eap_user(const struct hostapd_bss_config *conf, const u8 *identity,
-                    size_t identity_len, int phase2)
-{
-       struct hostapd_eap_user *user = conf->eap_user;
-
-#ifdef CONFIG_WPS
-       if (conf->wps_state && identity_len == WSC_ID_ENROLLEE_LEN &&
-           os_memcmp(identity, WSC_ID_ENROLLEE, WSC_ID_ENROLLEE_LEN) == 0) {
-               static struct hostapd_eap_user wsc_enrollee;
-               os_memset(&wsc_enrollee, 0, sizeof(wsc_enrollee));
-               wsc_enrollee.methods[0].method = eap_server_get_type(
-                       "WSC", &wsc_enrollee.methods[0].vendor);
-               return &wsc_enrollee;
-       }
-
-       if (conf->wps_state && identity_len == WSC_ID_REGISTRAR_LEN &&
-           os_memcmp(identity, WSC_ID_REGISTRAR, WSC_ID_REGISTRAR_LEN) == 0) {
-               static struct hostapd_eap_user wsc_registrar;
-               os_memset(&wsc_registrar, 0, sizeof(wsc_registrar));
-               wsc_registrar.methods[0].method = eap_server_get_type(
-                       "WSC", &wsc_registrar.methods[0].vendor);
-               wsc_registrar.password = (u8 *) conf->ap_pin;
-               wsc_registrar.password_len = conf->ap_pin ?
-                       os_strlen(conf->ap_pin) : 0;
-               return &wsc_registrar;
-       }
-#endif /* CONFIG_WPS */
-
-       while (user) {
-               if (!phase2 && user->identity == NULL) {
-                       /* Wildcard match */
-                       break;
-               }
-
-               if (user->phase2 == !!phase2 && user->wildcard_prefix &&
-                   identity_len >= user->identity_len &&
-                   os_memcmp(user->identity, identity, user->identity_len) ==
-                   0) {
-                       /* Wildcard prefix match */
-                       break;
-               }
-
-               if (user->phase2 == !!phase2 &&
-                   user->identity_len == identity_len &&
-                   os_memcmp(user->identity, identity, identity_len) == 0)
-                       break;
-               user = user->next;
-       }
-
-       return user;
-}