OSDN Git Service

Accumulative patch from commit dc013f1e37df3462085cf01a13f0c432f146ad7a
[android-x86/external-wpa_supplicant_8.git] / src / ap / ap_config.c
index 811ffc1..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;
 }
 
 
@@ -104,9 +106,9 @@ struct hostapd_config * hostapd_config_defaults(void)
        const struct hostapd_wmm_ac_params ac_be =
                { aCWmin, aCWmax, 3, 0, 0 }; /* best effort traffic */
        const struct hostapd_wmm_ac_params ac_vi = /* video traffic */
-               { aCWmin - 1, aCWmin, 2, 3000 / 32, 1 };
+               { aCWmin - 1, aCWmin, 2, 3000 / 32, 0 };
        const struct hostapd_wmm_ac_params ac_vo = /* voice traffic */
-               { aCWmin - 2, aCWmin - 1, 2, 1500 / 32, 1 };
+               { aCWmin - 2, aCWmin - 1, 2, 1500 / 32, 0 };
        const struct hostapd_tx_queue_params txq_bk =
                { 7, ecw2cw(aCWmin), ecw2cw(aCWmax), 0 };
        const struct hostapd_tx_queue_params txq_be =
@@ -158,6 +160,9 @@ struct hostapd_config * hostapd_config_defaults(void)
 
        conf->ht_capab = HT_CAP_INFO_SMPS_DISABLED;
 
+       conf->ap_table_max_size = 255;
+       conf->ap_table_expiration_time = 60;
+
        return conf;
 }
 
@@ -408,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);
@@ -474,9 +480,6 @@ static void hostapd_config_free_bss(struct hostapd_bss_config *conf)
        }
 #endif /* CONFIG_IEEE80211R */
 
-#ifdef ANDROID_P2P
-       os_free(conf->prioritize);
-#endif
 #ifdef CONFIG_WPS
        os_free(conf->wps_pin_requests);
        os_free(conf->device_name);
@@ -501,10 +504,25 @@ static void hostapd_config_free_bss(struct hostapd_bss_config *conf)
 
        os_free(conf->roaming_consortium);
        os_free(conf->venue_name);
+       os_free(conf->nai_realm_data);
+       os_free(conf->network_auth_type);
+       os_free(conf->anqp_3gpp_cell_net);
+       os_free(conf->domain_name);
 
 #ifdef CONFIG_RADIUS_TEST
        os_free(conf->dump_msk_file);
 #endif /* CONFIG_RADIUS_TEST */
+
+#ifdef CONFIG_HS20
+       os_free(conf->hs20_oper_friendly_name);
+       os_free(conf->hs20_wan_metrics);
+       os_free(conf->hs20_connection_capability);
+       os_free(conf->hs20_operating_class);
+#endif /* CONFIG_HS20 */
+
+       wpabuf_free(conf->vendor_elements);
+
+       os_free(conf->sae_groups);
 }
 
 
@@ -609,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;
-}