Lines Matching refs:bss
34 static int hostapd_config_read_vlan_file(struct hostapd_bss_config *bss,
101 vlan->next = bss->vlan;
102 bss->vlan = vlan;
260 user = NULL; /* already in the BSS list */
616 static int hostapd_parse_das_client(struct hostapd_bss_config *bss,
627 if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr))
630 os_free(bss->radius_das_shared_secret);
631 bss->radius_das_shared_secret = (u8 *) os_strdup(secret);
632 if (bss->radius_das_shared_secret == NULL)
634 bss->radius_das_shared_secret_len = os_strlen(secret);
799 struct hostapd_bss_config **all, *bss;
804 all = os_realloc_array(conf->bss, conf->num_bss + 1,
808 "multi-BSS entry");
811 conf->bss = all;
813 bss = os_zalloc(sizeof(*bss));
814 if (bss == NULL)
816 bss->radius = os_zalloc(sizeof(*bss->radius));
817 if (bss->radius == NULL) {
819 "multi-BSS RADIUS data");
820 os_free(bss);
824 conf->bss[conf->num_bss++] = bss;
825 conf->last_bss = bss;
827 hostapd_config_defaults_bss(bss);
828 os_strlcpy(bss->iface, ifname, sizeof(bss->iface));
829 os_memcpy(bss->ssid.vlan, bss->iface, IFNAMSIZ + 1);
932 static int add_r0kh(struct hostapd_bss_config *bss, char *value)
971 r0kh->next = bss->r0kh_list;
972 bss->r0kh_list = r0kh;
978 static int add_r1kh(struct hostapd_bss_config *bss, char *value)
1016 r1kh->next = bss->r1kh_list;
1017 bss->r1kh_list = r1kh;
1158 static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos,
1174 rc = os_realloc_array(bss->roaming_consortium,
1175 bss->roaming_consortium_count + 1,
1180 os_memcpy(rc[bss->roaming_consortium_count].oi, oi, len);
1181 rc[bss->roaming_consortium_count].len = len;
1183 bss->roaming_consortium = rc;
1184 bss->roaming_consortium_count++;
1238 static int parse_venue_name(struct hostapd_bss_config *bss, char *pos,
1241 if (parse_lang_string(&bss->venue_name, &bss->venue_name_count, pos)) {
1250 static int parse_3gpp_cell_net(struct hostapd_bss_config *bss, char *buf,
1309 os_free(bss->anqp_3gpp_cell_net);
1310 bss->anqp_3gpp_cell_net = info;
1311 bss->anqp_3gpp_cell_net_len = 2 + 3 + 3 * count;
1313 bss->anqp_3gpp_cell_net, bss->anqp_3gpp_cell_net_len);
1325 static int parse_nai_realm(struct hostapd_bss_config *bss, char *buf, int line)
1332 offsets = os_calloc(bss->nai_realm_count * MAX_NAI_REALMS,
1337 for (i = 0; i < bss->nai_realm_count; i++) {
1338 realm = &bss->nai_realm_data[i];
1346 realm = os_realloc_array(bss->nai_realm_data, bss->nai_realm_count + 1,
1352 bss->nai_realm_data = realm;
1355 for (i = 0; i < bss->nai_realm_count; i++) {
1356 realm = &bss->nai_realm_data[i];
1367 realm = &bss->nai_realm_data[bss->nai_realm_count];
1456 bss->nai_realm_count++;
1466 static int parse_qos_map_set(struct hostapd_bss_config *bss,
1500 os_memcpy(bss->qos_map_set, qos_map_set, count);
1501 bss->qos_map_set_len = count;
1510 static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
1516 if (bss->hs20_connection_capability_len >= 0xfff0)
1519 conn_cap = os_realloc(bss->hs20_connection_capability,
1520 bss->hs20_connection_capability_len + 4);
1524 bss->hs20_connection_capability = conn_cap;
1525 conn_cap += bss->hs20_connection_capability_len;
1538 bss->hs20_connection_capability_len += 4;
1544 static int hs20_parse_wan_metrics(struct hostapd_bss_config *bss, char *buf,
1596 os_free(bss->hs20_wan_metrics);
1597 bss->hs20_wan_metrics = wan_metrics;
1609 static int hs20_parse_oper_friendly_name(struct hostapd_bss_config *bss,
1612 if (parse_lang_string(&bss->hs20_oper_friendly_name,
1613 &bss->hs20_oper_friendly_name_count, pos)) {
1622 static int hs20_parse_icon(struct hostapd_bss_config *bss, char *pos)
1627 icon = os_realloc_array(bss->hs20_icons, bss->hs20_icons_count + 1,
1631 bss->hs20_icons = icon;
1632 icon = &bss->hs20_icons[bss->hs20_icons_count];
1669 bss->hs20_icons_count++;
1675 static int hs20_parse_osu_ssid(struct hostapd_bss_config *bss,
1688 os_memcpy(bss->osu_ssid, str, slen);
1689 bss->osu_ssid_len = slen;
1696 static int hs20_parse_osu_server_uri(struct hostapd_bss_config *bss,
1701 p = os_realloc_array(bss->hs20_osu_providers,
1702 bss->hs20_osu_providers_count + 1, sizeof(*p));
1706 bss->hs20_osu_providers = p;
1707 bss->last_osu = &bss->hs20_osu_providers[bss->hs20_osu_providers_count];
1708 bss->hs20_osu_providers_count++;
1709 os_memset(bss->last_osu, 0, sizeof(*p));
1710 bss->last_osu->server_uri = os_strdup(pos);
1716 static int hs20_parse_osu_friendly_name(struct hostapd_bss_config *bss,
1719 if (bss->last_osu == NULL) {
1724 if (parse_lang_string(&bss->last_osu->friendly_name,
1725 &bss->last_osu->friendly_name_count, pos)) {
1735 static int hs20_parse_osu_nai(struct hostapd_bss_config *bss,
1738 if (bss->last_osu == NULL) {
1743 os_free(bss->last_osu->osu_nai);
1744 bss->last_osu->osu_nai = os_strdup(pos);
1745 if (bss->last_osu->osu_nai == NULL)
1752 static int hs20_parse_osu_method_list(struct hostapd_bss_config *bss, char *pos,
1755 if (bss->last_osu == NULL) {
1760 if (hostapd_parse_intlist(&bss->last_osu->method_list, pos)) {
1769 static int hs20_parse_osu_icon(struct hostapd_bss_config *bss, char *pos,
1773 struct hs20_osu_provider *p = bss->last_osu;
1793 static int hs20_parse_osu_service_desc(struct hostapd_bss_config *bss,
1796 if (bss->last_osu == NULL) {
1801 if (parse_lang_string(&bss->last_osu->service_desc,
1802 &bss->last_osu->service_desc_count, pos)) {
1840 struct hostapd_bss_config *bss,
1844 os_strlcpy(conf->bss[0]->iface, pos,
1845 sizeof(conf->bss[0]->iface));
1847 os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
1849 os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
1851 os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
1872 bss->logger_syslog_level = atoi(pos);
1874 bss->logger_stdout_level = atoi(pos);
1876 bss->logger_syslog = atoi(pos);
1878 bss->logger_stdout = atoi(pos);
1883 bss->ssid.ssid_len = os_strlen(pos);
1884 if (bss->ssid.ssid_len > HOSTAPD_MAX_SSID_LEN ||
1885 bss->ssid.ssid_len < 1) {
1890 os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len);
1891 bss->ssid.ssid_set = 1;
1901 os_memcpy(bss->ssid.ssid, str, slen);
1902 bss->ssid.ssid_len = slen;
1903 bss->ssid.ssid_set = 1;
1906 bss->ssid.utf8_ssid = atoi(pos) > 0;
1908 bss->macaddr_acl = atoi(pos);
1909 if (bss->macaddr_acl != ACCEPT_UNLESS_DENIED &&
1910 bss->macaddr_acl != DENY_UNLESS_ACCEPTED &&
1911 bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) {
1913 line, bss->macaddr_acl);
1916 if (hostapd_config_read_maclist(pos, &bss->accept_mac,
1917 &bss->num_accept_mac)) {
1923 if (hostapd_config_read_maclist(pos, &bss->deny_mac,
1924 &bss->num_deny_mac)) {
1930 bss->wds_sta = atoi(pos);
1932 bss->start_disabled = atoi(pos);
1934 bss->isolate = atoi(pos);
1936 bss->ap_max_inactivity = atoi(pos);
1938 bss->skip_inactivity_poll = atoi(pos);
1948 bss->ieee802_1x = atoi(pos);
1950 bss->eapol_version = atoi(pos);
1951 if (bss->eapol_version < 1 || bss->eapol_version > 2) {
1954 line, bss->eapol_version, pos);
1957 wpa_printf(MSG_DEBUG, "eapol_version=%d", bss->eapol_version);
1960 bss->eap_server = atoi(pos);
1963 bss->eap_server = atoi(pos);
1965 if (hostapd_config_read_eap_user(pos, bss))
1968 os_free(bss->ca_cert);
1969 bss->ca_cert = os_strdup(pos);
1971 os_free(bss->server_cert);
1972 bss->server_cert = os_strdup(pos);
1974 os_free(bss->private_key);
1975 bss->private_key = os_strdup(pos);
1977 os_free(bss->private_key_passwd);
1978 bss->private_key_passwd = os_strdup(pos);
1980 bss->check_crl = atoi(pos);
1982 os_free(bss->ocsp_stapling_response);
1983 bss->ocsp_stapling_response = os_strdup(pos);
1985 os_free(bss->dh_file);
1986 bss->dh_file = os_strdup(pos);
1988 bss->fragment_size = atoi(pos);
1991 os_free(bss->pac_opaque_encr_key);
1992 bss->pac_opaque_encr_key = os_malloc(16);
1993 if (bss->pac_opaque_encr_key == NULL) {
1998 } else if (hexstr2bin(pos, bss->pac_opaque_encr_key, 16)) {
2010 os_free(bss->eap_fast_a_id);
2011 bss->eap_fast_a_id = os_malloc(idlen / 2);
2012 if (bss->eap_fast_a_id == NULL ||
2013 hexstr2bin(pos, bss->eap_fast_a_id, idlen / 2)) {
2016 os_free(bss->eap_fast_a_id);
2017 bss->eap_fast_a_id = NULL;
2020 bss->eap_fast_a_id_len = idlen / 2;
2023 os_free(bss->eap_fast_a_id_info);
2024 bss->eap_fast_a_id_info = os_strdup(pos);
2026 bss->eap_fast_prov = atoi(pos);
2028 bss->pac_key_lifetime = atoi(pos);
2030 bss->pac_key_refresh_time = atoi(pos);
2034 os_free(bss->eap_sim_db);
2035 bss->eap_sim_db = os_strdup(pos);
2037 bss->eap_sim_aka_result_ind = atoi(pos);
2041 bss->tnc = atoi(pos);
2045 bss->pwd_group = atoi(pos);
2050 os_free(bss->eap_req_id_text);
2051 bss->eap_req_id_text = os_strdup(pos);
2052 if (bss->eap_req_id_text == NULL) {
2057 bss->eap_req_id_text_len = os_strlen(bss->eap_req_id_text);
2058 term = os_strstr(bss->eap_req_id_text, "\\0");
2062 bss->eap_req_id_text_len -
2063 (term - bss->eap_req_id_text) - 1);
2064 bss->eap_req_id_text_len--;
2067 bss->default_wep_key_len = atoi(pos);
2068 if (bss->default_wep_key_len > 13) {
2071 (unsigned long) bss->default_wep_key_len,
2073 bss->default_wep_key_len * 8);
2077 bss->individual_wep_key_len = atoi(pos);
2078 if (bss->individual_wep_key_len < 0 ||
2079 bss->individual_wep_key_len > 13) {
2081 line, bss->individual_wep_key_len,
2082 bss->individual_wep_key_len * 8);
2086 bss->wep_rekeying_period = atoi(pos);
2087 if (bss->wep_rekeying_period < 0) {
2089 line, bss->wep_rekeying_period);
2093 bss->eap_reauth_period = atoi(pos);
2094 if (bss->eap_reauth_period < 0) {
2096 line, bss->eap_reauth_period);
2100 bss->eapol_key_index_workaround = atoi(pos);
2103 bss->ieee802_11f = 1;
2104 os_strlcpy(bss->iapp_iface, pos, sizeof(bss->iapp_iface));
2107 if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) {
2114 os_free(bss->nas_identifier);
2115 bss->nas_identifier = os_strdup(pos);
2119 &bss->radius->auth_servers,
2120 &bss->radius->num_auth_servers, pos, 1812,
2121 &bss->radius->auth_server)) {
2127 } else if (bss->radius->auth_server &&
2129 bss->radius->auth_server->port = atoi(pos);
2130 } else if (bss->radius->auth_server &&
2139 os_free(bss->radius->auth_server->shared_secret);
2140 bss->radius->auth_server->shared_secret = (u8 *) os_strdup(pos);
2141 bss->radius->auth_server->shared_secret_len = len;
2144 &bss->radius->acct_servers,
2145 &bss->radius->num_acct_servers, pos, 1813,
2146 &bss->radius->acct_server)) {
2152 } else if (bss->radius->acct_server &&
2154 bss->radius->acct_server->port = atoi(pos);
2155 } else if (bss->radius->acct_server &&
2164 os_free(bss->radius->acct_server->shared_secret);
2165 bss->radius->acct_server->shared_secret = (u8 *) os_strdup(pos);
2166 bss->radius->acct_server->shared_secret_len = len;
2168 bss->radius->retry_primary_interval = atoi(pos);
2170 bss->acct_interim_interval = atoi(pos);
2172 bss->radius_request_cui = atoi(pos);
2181 } else if (bss->radius_auth_req_attr == NULL) {
2182 bss->radius_auth_req_attr = attr;
2184 a = bss->radius_auth_req_attr;
2197 } else if (bss->radius_acct_req_attr == NULL) {
2198 bss->radius_acct_req_attr = attr;
2200 a = bss->radius_acct_req_attr;
2206 bss->radius_das_port = atoi(pos);
2208 if (hostapd_parse_das_client(bss, pos) < 0) {
2214 bss->radius_das_time_window = atoi(pos);
2216 bss->radius_das_require_event_timestamp = atoi(pos);
2219 bss->auth_algs = atoi(pos);
2220 if (bss->auth_algs == 0) {
2226 bss->max_num_sta = atoi(pos);
2227 if (bss->max_num_sta < 0 ||
2228 bss->max_num_sta > MAX_STA_COUNT) {
2230 line, bss->max_num_sta, MAX_STA_COUNT);
2234 bss->wpa = atoi(pos);
2236 bss->wpa_group_rekey = atoi(pos);
2238 bss->wpa_strict_rekey = atoi(pos);
2240 bss->wpa_gmk_rekey = atoi(pos);
2242 bss->wpa_ptk_rekey = atoi(pos);
2250 os_free(bss->ssid.wpa_passphrase);
2251 bss->ssid.wpa_passphrase = os_strdup(pos);
2252 if (bss->ssid.wpa_passphrase) {
2253 os_free(bss->ssid.wpa_psk);
2254 bss->ssid.wpa_psk = NULL;
2255 bss->ssid.wpa_passphrase_set = 1;
2258 os_free(bss->ssid.wpa_psk);
2259 bss->ssid.wpa_psk = os_zalloc(sizeof(struct hostapd_wpa_psk));
2260 if (bss->ssid.wpa_psk == NULL)
2262 if (hexstr2bin(pos, bss->ssid.wpa_psk->psk, PMK_LEN) ||
2266 os_free(bss->ssid.wpa_psk);
2267 bss->ssid.wpa_psk = NULL;
2270 bss->ssid.wpa_psk->group = 1;
2271 os_free(bss->ssid.wpa_passphrase);
2272 bss->ssid.wpa_passphrase = NULL;
2273 bss->ssid.wpa_psk_set = 1;
2275 os_free(bss->ssid.wpa_psk_file);
2276 bss->ssid.wpa_psk_file = os_strdup(pos);
2277 if (!bss->ssid.wpa_psk_file) {
2283 bss->wpa_key_mgmt = hostapd_config_parse_key_mgmt(line, pos);
2284 if (bss->wpa_key_mgmt == -1)
2287 bss->wpa_psk_radius = atoi(pos);
2288 if (bss->wpa_psk_radius != PSK_RADIUS_IGNORED &&
2289 bss->wpa_psk_radius != PSK_RADIUS_ACCEPTED &&
2290 bss->wpa_psk_radius != PSK_RADIUS_REQUIRED) {
2293 line, bss->wpa_psk_radius);
2297 bss->wpa_pairwise = hostapd_config_parse_cipher(line, pos);
2298 if (bss->wpa_pairwise == -1 || bss->wpa_pairwise == 0)
2300 if (bss->wpa_pairwise &
2303 bss->wpa_pairwise, pos);
2307 bss->rsn_pairwise = hostapd_config_parse_cipher(line, pos);
2308 if (bss->rsn_pairwise == -1 || bss->rsn_pairwise == 0)
2310 if (bss->rsn_pairwise &
2313 bss->rsn_pairwise, pos);
2318 bss->rsn_preauth = atoi(pos);
2320 os_free(bss->rsn_preauth_interfaces);
2321 bss->rsn_preauth_interfaces = os_strdup(pos);
2325 bss->peerkey = atoi(pos);
2330 hexstr2bin(pos, bss->mobility_domain,
2339 hexstr2bin(pos, bss->r1_key_holder, FT_R1KH_ID_LEN) != 0) {
2346 bss->r0_key_lifetime = atoi(pos);
2348 bss->reassociation_deadline = atoi(pos);
2350 if (add_r0kh(bss, pos) < 0) {
2356 if (add_r1kh(bss, pos) < 0) {
2362 bss->pmk_r1_push = atoi(pos);
2364 bss->ft_over_ds = atoi(pos);
2368 os_free(bss->ctrl_interface);
2369 bss->ctrl_interface = os_strdup(pos);
2378 bss->ctrl_interface_gid = grp->gr_gid;
2379 bss->ctrl_interface_gid_set = 1;
2381 bss->ctrl_interface_gid, group);
2386 bss->ctrl_interface_gid = strtol(group, &endp, 10);
2392 bss->ctrl_interface_gid_set = 1;
2394 bss->ctrl_interface_gid);
2399 os_free(bss->radius_server_clients);
2400 bss->radius_server_clients = os_strdup(pos);
2402 bss->radius_server_auth_port = atoi(pos);
2404 bss->radius_server_acct_port = atoi(pos);
2406 bss->radius_server_ipv6 = atoi(pos);
2409 os_free(bss->test_socket);
2410 bss->test_socket = os_strdup(pos);
2412 bss->use_pae_group_addr = atoi(pos);
2429 bss->wps_rf_bands = WPS_RF_50GHZ;
2432 bss->wps_rf_bands = WPS_RF_24GHZ;
2435 bss->wps_rf_bands = WPS_RF_24GHZ | WPS_RF_50GHZ;
2483 bss->dtim_period = atoi(pos);
2484 if (bss->dtim_period < 1 || bss->dtim_period > 255) {
2486 line, bss->dtim_period);
2532 bss->ignore_broadcast_ssid = atoi(pos);
2534 bss->ssid.wep.idx = atoi(pos);
2535 if (bss->ssid.wep.idx > 3) {
2538 bss->ssid.wep.idx);
2545 if (hostapd_config_read_wep(&bss->ssid.wep,
2553 bss->ssid.dynamic_vlan = atoi(pos);
2555 if (hostapd_config_read_vlan_file(bss, pos)) {
2561 bss->ssid.vlan_naming = atoi(pos);
2562 if (bss->ssid.vlan_naming >= DYNAMIC_VLAN_NAMING_END ||
2563 bss->ssid.vlan_naming < 0) {
2566 line, bss->ssid.vlan_naming);
2571 os_free(bss->ssid.vlan_tagged_interface);
2572 bss->ssid.vlan_tagged_interface = os_strdup(pos);
2587 bss->wmm_enabled = atoi(pos);
2589 bss->wmm_uapsd = atoi(pos);
2597 } else if (os_strcmp(buf, "bss") == 0) {
2599 wpa_printf(MSG_ERROR, "Line %d: invalid bss item",
2604 if (hwaddr_aton(pos, bss->bssid)) {
2611 bss->ieee80211w = atoi(pos);
2614 bss->group_mgmt_cipher = WPA_CIPHER_AES_128_CMAC;
2616 bss->group_mgmt_cipher = WPA_CIPHER_BIP_GMAC_128;
2618 bss->group_mgmt_cipher = WPA_CIPHER_BIP_GMAC_256;
2620 bss->group_mgmt_cipher = WPA_CIPHER_BIP_CMAC_256;
2627 bss->assoc_sa_query_max_timeout = atoi(pos);
2628 if (bss->assoc_sa_query_max_timeout == 0) {
2634 bss->assoc_sa_query_retry_timeout = atoi(pos);
2635 if (bss->assoc_sa_query_retry_timeout == 0) {
2674 bss->max_listen_interval = atoi(pos);
2676 bss->disable_pmksa_caching = atoi(pos);
2678 bss->okc = atoi(pos);
2681 bss->wps_state = atoi(pos);
2682 if (bss->wps_state < 0 || bss->wps_state > 2) {
2688 bss->wps_independent = atoi(pos);
2690 bss->ap_setup_locked = atoi(pos);
2692 if (uuid_str2bin(pos, bss->uuid)) {
2697 os_free(bss->wps_pin_requests);
2698 bss->wps_pin_requests = os_strdup(pos);
2705 os_free(bss->device_name);
2706 bss->device_name = os_strdup(pos);
2713 os_free(bss->manufacturer);
2714 bss->manufacturer = os_strdup(pos);
2721 os_free(bss->model_name);
2722 bss->model_name = os_strdup(pos);
2729 os_free(bss->model_number);
2730 bss->model_number = os_strdup(pos);
2737 os_free(bss->serial_number);
2738 bss->serial_number = os_strdup(pos);
2740 if (wps_dev_type_str2bin(pos, bss->device_type))
2743 os_free(bss->config_methods);
2744 bss->config_methods = os_strdup(pos);
2746 if (hexstr2bin(pos, bss->os_version, 4)) {
2752 os_free(bss->ap_pin);
2753 bss->ap_pin = os_strdup(pos);
2755 bss->skip_cred_build = atoi(pos);
2757 os_free(bss->extra_cred);
2758 bss->extra_cred = (u8 *) os_readfile(pos, &bss->extra_cred_len);
2759 if (bss->extra_cred == NULL) {
2765 bss->wps_cred_processing = atoi(pos);
2767 os_free(bss->ap_settings);
2768 bss->ap_settings =
2769 (u8 *) os_readfile(pos, &bss->ap_settings_len);
2770 if (bss->ap_settings == NULL) {
2776 os_free(bss->upnp_iface);
2777 bss->upnp_iface = os_strdup(pos);
2779 os_free(bss->friendly_name);
2780 bss->friendly_name = os_strdup(pos);
2782 os_free(bss->manufacturer_url);
2783 bss->manufacturer_url = os_strdup(pos);
2785 os_free(bss->model_description);
2786 bss->model_description = os_strdup(pos);
2788 os_free(bss->model_url);
2789 bss->model_url = os_strdup(pos);
2791 os_free(bss->upc);
2792 bss->upc = os_strdup(pos);
2794 bss->pbc_in_m1 = atoi(pos);
2796 os_free(bss->server_id);
2797 bss->server_id = os_strdup(pos);
2800 bss->wps_nfc_dev_pw_id = atoi(pos);
2801 if (bss->wps_nfc_dev_pw_id < 0x10 ||
2802 bss->wps_nfc_dev_pw_id > 0xffff) {
2807 bss->wps_nfc_pw_from_config = 1;
2809 wpabuf_free(bss->wps_nfc_dh_pubkey);
2810 bss->wps_nfc_dh_pubkey = hostapd_parse_bin(pos);
2811 bss->wps_nfc_pw_from_config = 1;
2813 wpabuf_free(bss->wps_nfc_dh_privkey);
2814 bss->wps_nfc_dh_privkey = hostapd_parse_bin(pos);
2815 bss->wps_nfc_pw_from_config = 1;
2817 wpabuf_free(bss->wps_nfc_dev_pw);
2818 bss->wps_nfc_dev_pw = hostapd_parse_bin(pos);
2819 bss->wps_nfc_pw_from_config = 1;
2825 bss->p2p |= P2P_MANAGE;
2827 bss->p2p &= ~P2P_MANAGE;
2830 bss->p2p |= P2P_ALLOW_CROSS_CONNECTION;
2832 bss->p2p &= ~P2P_ALLOW_CROSS_CONNECTION;
2835 bss->disassoc_low_ack = atoi(pos);
2838 bss->tdls |= TDLS_PROHIBIT;
2840 bss->tdls &= ~TDLS_PROHIBIT;
2843 bss->tdls |= TDLS_PROHIBIT_CHAN_SWITCH;
2845 bss->tdls &= ~TDLS_PROHIBIT_CHAN_SWITCH;
2852 bss->time_advertisement = atoi(pos);
2860 os_free(bss->time_zone);
2861 bss->time_zone = os_strdup(pos);
2862 if (bss->time_zone == NULL)
2866 bss->wnm_sleep_mode = atoi(pos);
2868 bss->bss_transition = atoi(pos);
2872 bss->interworking = atoi(pos);
2874 bss->access_network_type = atoi(pos);
2875 if (bss->access_network_type < 0 ||
2876 bss->access_network_type > 15) {
2883 bss->internet = atoi(pos);
2885 bss->asra = atoi(pos);
2887 bss->esr = atoi(pos);
2889 bss->uesa = atoi(pos);
2891 bss->venue_group = atoi(pos);
2892 bss->venue_info_set = 1;
2894 bss->venue_type = atoi(pos);
2895 bss->venue_info_set = 1;
2897 if (hwaddr_aton(pos, bss->hessid)) {
2902 if (parse_roaming_consortium(bss, pos, line) < 0)
2905 if (parse_venue_name(bss, pos, line) < 0)
2920 os_free(bss->network_auth_type);
2921 bss->network_auth_type = os_malloc(redirect_url_len + 3 + 1);
2922 if (bss->network_auth_type == NULL)
2924 *bss->network_auth_type = auth_type;
2925 WPA_PUT_LE16(bss->network_auth_type + 1, redirect_url_len);
2927 os_memcpy(bss->network_auth_type + 3, pos + 2,
2929 bss->network_auth_type_len = 3 + redirect_url_len;
2931 if (hexstr2bin(pos, &bss->ipaddr_type_availability, 1)) {
2934 bss->ipaddr_type_configured = 0;
2937 bss->ipaddr_type_configured = 1;
2972 os_free(bss->domain_name);
2973 bss->domain_name = domain_list;
2974 bss->domain_name_len = domain_list_len;
2976 if (parse_3gpp_cell_net(bss, pos, line) < 0)
2979 if (parse_nai_realm(bss, pos, line) < 0)
2982 bss->gas_frag_limit = atoi(pos);
2984 bss->gas_comeback_delay = atoi(pos);
2986 if (parse_qos_map_set(bss, pos, line) < 0)
2991 bss->dump_msk_file);
2992 bss->dump_msk_file = os_strdup(pos);
2996 bss->hs20 = atoi(pos);
2998 bss->disable_dgaf = atoi(pos);
3000 bss->osen = atoi(pos);
3002 bss->anqp_domain_id = atoi(pos);
3004 bss->hs20_deauth_req_timeout = atoi(pos);
3006 if (hs20_parse_oper_friendly_name(bss, pos, line) < 0)
3009 if (hs20_parse_wan_metrics(bss, pos, line) < 0)
3012 if (hs20_parse_conn_capab(bss, pos, line) < 0) {
3036 os_free(bss->hs20_operating_class);
3037 bss->hs20_operating_class = oper_class;
3038 bss->hs20_operating_class_len = oper_class_len;
3040 if (hs20_parse_icon(bss, pos) < 0) {
3046 if (hs20_parse_osu_ssid(bss, pos, line) < 0)
3049 if (hs20_parse_osu_server_uri(bss, pos, line) < 0)
3052 if (hs20_parse_osu_friendly_name(bss, pos, line) < 0)
3055 if (hs20_parse_osu_nai(bss, pos, line) < 0)
3058 if (hs20_parse_osu_method_list(bss, pos, line) < 0)
3061 if (hs20_parse_osu_icon(bss, pos, line) < 0)
3064 if (hs20_parse_osu_service_desc(bss, pos, line) < 0)
3067 os_free(bss->subscr_remediation_url);
3068 bss->subscr_remediation_url = os_strdup(pos);
3070 bss->subscr_remediation_method = atoi(pos);
3091 WPA_PUT_LE16(bss->bss_load_test, atoi(pos));
3099 bss->bss_load_test[2] = atoi(pos);
3107 WPA_PUT_LE16(&bss->bss_load_test[3], atoi(pos));
3108 bss->bss_load_test_set = 1;
3121 wpabuf_free(bss->vendor_elements);
3122 bss->vendor_elements = NULL;
3138 wpabuf_free(bss->vendor_elements);
3139 bss->vendor_elements = elems;
3141 bss->sae_anti_clogging_threshold = atoi(pos);
3143 if (hostapd_parse_intlist(&bss->sae_groups, pos)) {
3160 os_free(bss->wowlan_triggers);
3161 bss->wowlan_triggers = os_strdup(pos);
3181 struct hostapd_bss_config *bss;
3210 bss = conf->last_bss = conf->bss[0];
3213 bss = conf->last_bss;
3238 errors += hostapd_config_fill(conf, bss, buf, pos, line);
3244 hostapd_set_security_params(conf->bss[i], 1);
3263 struct hostapd_bss_config *bss, char *field, char *value)
3268 errors = hostapd_config_fill(conf, bss, field, value, 0);
3276 hostapd_set_security_params(conf->bss[i], 0);