Lines Matching full:pos
34 char buf[128], *pos, *pos2, *pos3; in hostapd_config_read_vlan_file() local
49 pos = buf; in hostapd_config_read_vlan_file()
50 while (*pos != '\0') { in hostapd_config_read_vlan_file()
51 if (*pos == '\n') { in hostapd_config_read_vlan_file()
52 *pos = '\0'; in hostapd_config_read_vlan_file()
55 pos++; in hostapd_config_read_vlan_file()
62 pos = buf + 1; in hostapd_config_read_vlan_file()
64 vlan_id = strtol(buf, &pos, 10); in hostapd_config_read_vlan_file()
65 if (buf == pos || vlan_id < 1 || in hostapd_config_read_vlan_file()
74 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_vlan_file()
75 pos++; in hostapd_config_read_vlan_file()
76 pos2 = pos; in hostapd_config_read_vlan_file()
83 if (*pos == '\0' || os_strlen(pos) > IFNAMSIZ) { in hostapd_config_read_vlan_file()
108 os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname)); in hostapd_config_read_vlan_file()
125 char buf[128], *pos; in hostapd_config_read_maclist() local
143 pos = buf; in hostapd_config_read_maclist()
144 while (*pos != '\0') { in hostapd_config_read_maclist()
145 if (*pos == '\n') { in hostapd_config_read_maclist()
146 *pos = '\0'; in hostapd_config_read_maclist()
149 pos++; in hostapd_config_read_maclist()
153 pos = buf; in hostapd_config_read_maclist()
156 pos++; in hostapd_config_read_maclist()
159 if (hwaddr_aton(pos, addr)) { in hostapd_config_read_maclist()
161 "line %d in '%s'", pos, line, fname); in hostapd_config_read_maclist()
171 pos = buf; in hostapd_config_read_maclist()
172 while (*pos != '\0' && *pos != ' ' && *pos != '\t') in hostapd_config_read_maclist()
173 pos++; in hostapd_config_read_maclist()
174 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_maclist()
175 pos++; in hostapd_config_read_maclist()
176 if (*pos != '\0') in hostapd_config_read_maclist()
177 vlan_id = atoi(pos); in hostapd_config_read_maclist()
198 char **pos, int line, in hostapd_config_eap_user_salted() argument
201 char *pos2 = *pos; in hostapd_config_eap_user_salted()
206 if (pos2 - *pos < (int) (2 * (len + 1))) { /* at least 1 byte of salt */ in hostapd_config_eap_user_salted()
221 if (hexstr2bin(*pos, user->password, len) < 0) { in hostapd_config_eap_user_salted()
228 *pos += 2 * len; in hostapd_config_eap_user_salted()
230 user->salt_len = (pos2 - *pos) / 2; in hostapd_config_eap_user_salted()
239 if (hexstr2bin(*pos, user->salt, user->salt_len) < 0) { in hostapd_config_eap_user_salted()
246 *pos = pos2; in hostapd_config_eap_user_salted()
255 char buf[512], *pos, *start, *pos2; in hostapd_config_read_eap_user() local
283 pos = buf; in hostapd_config_read_eap_user()
284 while (*pos != '\0') { in hostapd_config_read_eap_user()
285 if (*pos == '\n') { in hostapd_config_read_eap_user()
286 *pos = '\0'; in hostapd_config_read_eap_user()
289 pos++; in hostapd_config_read_eap_user()
332 pos = buf; in hostapd_config_read_eap_user()
334 pos = buf + 1; in hostapd_config_read_eap_user()
335 start = pos; in hostapd_config_read_eap_user()
336 while (*pos != '"' && *pos != '\0') in hostapd_config_read_eap_user()
337 pos++; in hostapd_config_read_eap_user()
338 if (*pos == '\0') { in hostapd_config_read_eap_user()
345 user->identity = os_memdup(start, pos - start); in hostapd_config_read_eap_user()
351 user->identity_len = pos - start; in hostapd_config_read_eap_user()
353 if (pos[0] == '"' && pos[1] == '*') { in hostapd_config_read_eap_user()
355 pos++; in hostapd_config_read_eap_user()
358 pos++; in hostapd_config_read_eap_user()
359 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_eap_user()
360 pos++; in hostapd_config_read_eap_user()
362 if (*pos == '\0') { in hostapd_config_read_eap_user()
368 start = pos; in hostapd_config_read_eap_user()
369 while (*pos != ' ' && *pos != '\t' && *pos != '\0') in hostapd_config_read_eap_user()
370 pos++; in hostapd_config_read_eap_user()
371 if (*pos == '\0') { in hostapd_config_read_eap_user()
372 pos = NULL; in hostapd_config_read_eap_user()
374 *pos = '\0'; in hostapd_config_read_eap_user()
375 pos++; in hostapd_config_read_eap_user()
433 if (pos == NULL) in hostapd_config_read_eap_user()
436 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_eap_user()
437 pos++; in hostapd_config_read_eap_user()
438 if (*pos == '\0') in hostapd_config_read_eap_user()
441 if (os_strncmp(pos, "[ver=0]", 7) == 0) { in hostapd_config_read_eap_user()
446 if (os_strncmp(pos, "[ver=1]", 7) == 0) { in hostapd_config_read_eap_user()
451 if (os_strncmp(pos, "[2]", 3) == 0) { in hostapd_config_read_eap_user()
456 if (*pos == '"') { in hostapd_config_read_eap_user()
457 pos++; in hostapd_config_read_eap_user()
458 start = pos; in hostapd_config_read_eap_user()
459 while (*pos != '"' && *pos != '\0') in hostapd_config_read_eap_user()
460 pos++; in hostapd_config_read_eap_user()
461 if (*pos == '\0') { in hostapd_config_read_eap_user()
468 user->password = os_memdup(start, pos - start); in hostapd_config_read_eap_user()
474 user->password_len = pos - start; in hostapd_config_read_eap_user()
476 pos++; in hostapd_config_read_eap_user()
477 } else if (os_strncmp(pos, "hash:", 5) == 0) { in hostapd_config_read_eap_user()
478 pos += 5; in hostapd_config_read_eap_user()
479 pos2 = pos; in hostapd_config_read_eap_user()
483 if (pos2 - pos != 32) { in hostapd_config_read_eap_user()
494 if (hexstr2bin(pos, user->password, 16) < 0) { in hostapd_config_read_eap_user()
501 pos = pos2; in hostapd_config_read_eap_user()
502 } else if (os_strncmp(pos, "ssha1:", 6) == 0) { in hostapd_config_read_eap_user()
503 pos += 6; in hostapd_config_read_eap_user()
505 &pos, in hostapd_config_read_eap_user()
508 } else if (os_strncmp(pos, "ssha256:", 8) == 0) { in hostapd_config_read_eap_user()
509 pos += 8; in hostapd_config_read_eap_user()
511 &pos, in hostapd_config_read_eap_user()
514 } else if (os_strncmp(pos, "ssha512:", 8) == 0) { in hostapd_config_read_eap_user()
515 pos += 8; in hostapd_config_read_eap_user()
517 &pos, in hostapd_config_read_eap_user()
521 pos2 = pos; in hostapd_config_read_eap_user()
525 if ((pos2 - pos) & 1) { in hostapd_config_read_eap_user()
530 user->password = os_malloc((pos2 - pos) / 2); in hostapd_config_read_eap_user()
536 if (hexstr2bin(pos, user->password, in hostapd_config_read_eap_user()
537 (pos2 - pos) / 2) < 0) { in hostapd_config_read_eap_user()
542 user->password_len = (pos2 - pos) / 2; in hostapd_config_read_eap_user()
543 pos = pos2; in hostapd_config_read_eap_user()
546 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_eap_user()
547 pos++; in hostapd_config_read_eap_user()
548 if (os_strncmp(pos, "[2]", 3) == 0) { in hostapd_config_read_eap_user()
820 char *pos; in hostapd_parse_chanlist() local
823 pos = val; in hostapd_parse_chanlist()
824 while (pos) { in hostapd_parse_chanlist()
825 pos = os_strchr(pos, ' '); in hostapd_parse_chanlist()
826 if (pos) in hostapd_parse_chanlist()
827 *pos++ = ','; in hostapd_parse_chanlist()
840 char *pos, *end; in hostapd_parse_intlist() local
845 pos = val; in hostapd_parse_intlist()
847 while (*pos != '\0') { in hostapd_parse_intlist()
848 if (*pos == ' ') in hostapd_parse_intlist()
850 pos++; in hostapd_parse_intlist()
856 pos = val; in hostapd_parse_intlist()
858 while (*pos != '\0') { in hostapd_parse_intlist()
859 end = os_strchr(pos, ' '); in hostapd_parse_intlist()
863 list[count++] = atoi(pos); in hostapd_parse_intlist()
866 pos = end + 1; in hostapd_parse_intlist()
915 static int rkh_derive_key(const char *pos, u8 *key, size_t key_len) in rkh_derive_key() argument
920 if (!hexstr2bin(pos, key, key_len)) in rkh_derive_key()
924 if (hexstr2bin(pos, oldkey, sizeof(oldkey))) in rkh_derive_key()
937 char *pos, *next; in add_r0kh() local
944 pos = value; in add_r0kh()
945 next = os_strchr(pos, ' '); in add_r0kh()
948 if (next == NULL || hwaddr_aton(pos, r0kh->addr)) { in add_r0kh()
949 wpa_printf(MSG_ERROR, "Invalid R0KH MAC address: '%s'", pos); in add_r0kh()
954 pos = next; in add_r0kh()
955 next = os_strchr(pos, ' '); in add_r0kh()
958 if (next == NULL || next - pos > FT_R0KH_ID_MAX_LEN) { in add_r0kh()
959 wpa_printf(MSG_ERROR, "Invalid R0KH-ID: '%s'", pos); in add_r0kh()
963 r0kh->id_len = next - pos - 1; in add_r0kh()
964 os_memcpy(r0kh->id, pos, r0kh->id_len); in add_r0kh()
966 pos = next; in add_r0kh()
967 if (rkh_derive_key(pos, r0kh->key, sizeof(r0kh->key)) < 0) { in add_r0kh()
968 wpa_printf(MSG_ERROR, "Invalid R0KH key: '%s'", pos); in add_r0kh()
983 char *pos, *next; in add_r1kh() local
991 pos = value; in add_r1kh()
992 next = os_strchr(pos, ' '); in add_r1kh()
995 if (next == NULL || hwaddr_aton(pos, r1kh->addr)) { in add_r1kh()
996 wpa_printf(MSG_ERROR, "Invalid R1KH MAC address: '%s'", pos); in add_r1kh()
1001 pos = next; in add_r1kh()
1002 next = os_strchr(pos, ' '); in add_r1kh()
1005 if (next == NULL || hwaddr_aton(pos, r1kh->id)) { in add_r1kh()
1006 wpa_printf(MSG_ERROR, "Invalid R1KH-ID: '%s'", pos); in add_r1kh()
1011 pos = next; in add_r1kh()
1012 if (rkh_derive_key(pos, r1kh->key, sizeof(r1kh->key)) < 0) { in add_r1kh()
1013 wpa_printf(MSG_ERROR, "Invalid R1KH key: '%s'", pos); in add_r1kh()
1029 char buf[256], *pos; in hostapd_config_read_rxkh_file() local
1046 pos = buf; in hostapd_config_read_rxkh_file()
1047 while (*pos != '\0') { in hostapd_config_read_rxkh_file()
1048 if (*pos == '\n') { in hostapd_config_read_rxkh_file()
1049 *pos = '\0'; in hostapd_config_read_rxkh_file()
1052 pos++; in hostapd_config_read_rxkh_file()
1057 pos = os_strchr(buf, '='); in hostapd_config_read_rxkh_file()
1058 if (!pos) { in hostapd_config_read_rxkh_file()
1064 *pos = '\0'; in hostapd_config_read_rxkh_file()
1065 pos++; in hostapd_config_read_rxkh_file()
1068 if (add_r0kh(conf, pos) < 0) { in hostapd_config_read_rxkh_file()
1071 line, pos); in hostapd_config_read_rxkh_file()
1075 if (add_r1kh(conf, pos) < 0) { in hostapd_config_read_rxkh_file()
1078 line, pos); in hostapd_config_read_rxkh_file()
1262 char *pos, *end; in hostapd_parse_he_srg_bitmap() local
1265 pos = val; in hostapd_parse_he_srg_bitmap()
1266 while (*pos != '\0') { in hostapd_parse_he_srg_bitmap()
1267 end = os_strchr(pos, ' '); in hostapd_parse_he_srg_bitmap()
1271 bitpos = atoi(pos); in hostapd_parse_he_srg_bitmap()
1278 pos = end + 1; in hostapd_parse_he_srg_bitmap()
1288 static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos, in parse_roaming_consortium() argument
1291 size_t len = os_strlen(pos); in parse_roaming_consortium()
1297 hexstr2bin(pos, oi, len / 2)) { in parse_roaming_consortium()
1299 "'%s'", line, pos); in parse_roaming_consortium()
1321 unsigned int *count, char *pos) in parse_lang_string() argument
1328 if (*pos == '"' || (*pos == 'P' && pos[1] == '"')) { in parse_lang_string()
1329 str = wpa_config_parse_string(pos, &slen); in parse_lang_string()
1332 pos = str; in parse_lang_string()
1335 sep = os_strchr(pos, ':'); in parse_lang_string()
1340 clen = os_strlen(pos); in parse_lang_string()
1357 os_memcpy(ls->lang, pos, clen); in parse_lang_string()
1368 static int parse_venue_name(struct hostapd_bss_config *bss, char *pos, in parse_venue_name() argument
1371 if (parse_lang_string(&bss->venue_name, &bss->venue_name_count, pos)) { in parse_venue_name()
1373 line, pos); in parse_venue_name()
1380 static int parse_venue_url(struct hostapd_bss_config *bss, char *pos, in parse_venue_url() argument
1388 sep = os_strchr(pos, ':'); in parse_venue_url()
1405 url->venue_number = atoi(pos); in parse_venue_url()
1413 line, pos); in parse_venue_url()
1422 char *pos; in parse_3gpp_cell_net() local
1428 for (pos = buf; *pos; pos++) { in parse_3gpp_cell_net()
1429 if ((*pos < '0' || *pos > '9') && *pos != ';' && *pos != ',') in parse_3gpp_cell_net()
1431 if (*pos == ';') in parse_3gpp_cell_net()
1449 pos = buf; in parse_3gpp_cell_net()
1450 while (pos && *pos) { in parse_3gpp_cell_net()
1454 mcc = pos; in parse_3gpp_cell_net()
1455 mnc = os_strchr(pos, ','); in parse_3gpp_cell_net()
1459 pos = os_strchr(mnc, ';'); in parse_3gpp_cell_net()
1460 if (pos) in parse_3gpp_cell_net()
1461 *pos++ = '\0'; in parse_3gpp_cell_net()
1498 char *pos, *end, *rpos; in parse_nai_realm() local
1538 pos = buf; in parse_nai_realm()
1539 realm->encoding = atoi(pos); in parse_nai_realm()
1540 pos = os_strchr(pos, ','); in parse_nai_realm()
1541 if (pos == NULL) in parse_nai_realm()
1543 pos++; in parse_nai_realm()
1545 end = os_strchr(pos, ','); in parse_nai_realm()
1547 len = end - pos; in parse_nai_realm()
1550 len = os_strlen(pos); in parse_nai_realm()
1558 os_memcpy(realm->realm_buf, pos, len); in parse_nai_realm()
1561 pos = end + 1; in parse_nai_realm()
1563 pos = NULL; in parse_nai_realm()
1565 while (pos && *pos) { in parse_nai_realm()
1576 end = os_strchr(pos, ','); in parse_nai_realm()
1578 end = pos + os_strlen(pos); in parse_nai_realm()
1580 eap->eap_method = atoi(pos); in parse_nai_realm()
1582 pos = os_strchr(pos, '['); in parse_nai_realm()
1583 if (pos == NULL || pos > end) in parse_nai_realm()
1585 pos++; in parse_nai_realm()
1590 eap->auth_id[eap->num_auths] = atoi(pos); in parse_nai_realm()
1591 pos = os_strchr(pos, ':'); in parse_nai_realm()
1592 if (pos == NULL || pos > end) in parse_nai_realm()
1594 pos++; in parse_nai_realm()
1595 eap->auth_val[eap->num_auths] = atoi(pos); in parse_nai_realm()
1596 pos = os_strchr(pos, ']'); in parse_nai_realm()
1597 if (pos == NULL || pos > end) in parse_nai_realm()
1599 pos++; in parse_nai_realm()
1606 pos = end + 1; in parse_nai_realm()
1688 char *pos = buf; in parse_qos_map_set() local
1698 val = atoi(pos); in parse_qos_map_set()
1706 pos = os_strchr(pos, ','); in parse_qos_map_set()
1707 if (!pos) in parse_qos_map_set()
1709 pos++; in parse_qos_map_set()
1730 char *pos; in hs20_parse_conn_capab() local
1742 pos = buf; in hs20_parse_conn_capab()
1743 conn_cap[0] = atoi(pos); in hs20_parse_conn_capab()
1744 pos = os_strchr(pos, ':'); in hs20_parse_conn_capab()
1745 if (pos == NULL) in hs20_parse_conn_capab()
1747 pos++; in hs20_parse_conn_capab()
1748 WPA_PUT_LE16(conn_cap + 1, atoi(pos)); in hs20_parse_conn_capab()
1749 pos = os_strchr(pos, ':'); in hs20_parse_conn_capab()
1750 if (pos == NULL) in hs20_parse_conn_capab()
1752 pos++; in hs20_parse_conn_capab()
1753 conn_cap[3] = atoi(pos); in hs20_parse_conn_capab()
1764 char *pos; in hs20_parse_wan_metrics() local
1772 pos = buf; in hs20_parse_wan_metrics()
1774 if (hexstr2bin(pos, wan_metrics, 1) < 0) in hs20_parse_wan_metrics()
1776 pos += 2; in hs20_parse_wan_metrics()
1777 if (*pos != ':') in hs20_parse_wan_metrics()
1779 pos++; in hs20_parse_wan_metrics()
1782 WPA_PUT_LE32(wan_metrics + 1, atoi(pos)); in hs20_parse_wan_metrics()
1783 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1784 if (pos == NULL) in hs20_parse_wan_metrics()
1786 pos++; in hs20_parse_wan_metrics()
1789 WPA_PUT_LE32(wan_metrics + 5, atoi(pos)); in hs20_parse_wan_metrics()
1790 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1791 if (pos == NULL) in hs20_parse_wan_metrics()
1793 pos++; in hs20_parse_wan_metrics()
1796 wan_metrics[9] = atoi(pos); in hs20_parse_wan_metrics()
1797 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1798 if (pos == NULL) in hs20_parse_wan_metrics()
1800 pos++; in hs20_parse_wan_metrics()
1803 wan_metrics[10] = atoi(pos); in hs20_parse_wan_metrics()
1804 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1805 if (pos == NULL) in hs20_parse_wan_metrics()
1807 pos++; in hs20_parse_wan_metrics()
1810 WPA_PUT_LE16(wan_metrics + 11, atoi(pos)); in hs20_parse_wan_metrics()
1826 char *pos, int line) in hs20_parse_oper_friendly_name() argument
1829 &bss->hs20_oper_friendly_name_count, pos)) { in hs20_parse_oper_friendly_name()
1831 "hs20_oper_friendly_name '%s'", line, pos); in hs20_parse_oper_friendly_name()
1838 static int hs20_parse_icon(struct hostapd_bss_config *bss, char *pos) in hs20_parse_icon() argument
1851 icon->width = atoi(pos); in hs20_parse_icon()
1852 pos = os_strchr(pos, ':'); in hs20_parse_icon()
1853 if (pos == NULL) in hs20_parse_icon()
1855 pos++; in hs20_parse_icon()
1857 icon->height = atoi(pos); in hs20_parse_icon()
1858 pos = os_strchr(pos, ':'); in hs20_parse_icon()
1859 if (pos == NULL) in hs20_parse_icon()
1861 pos++; in hs20_parse_icon()
1863 end = os_strchr(pos, ':'); in hs20_parse_icon()
1864 if (end == NULL || end - pos > 3) in hs20_parse_icon()
1866 os_memcpy(icon->language, pos, end - pos); in hs20_parse_icon()
1867 pos = end + 1; in hs20_parse_icon()
1869 end = os_strchr(pos, ':'); in hs20_parse_icon()
1870 if (end == NULL || end - pos > 255) in hs20_parse_icon()
1872 os_memcpy(icon->type, pos, end - pos); in hs20_parse_icon()
1873 pos = end + 1; in hs20_parse_icon()
1875 end = os_strchr(pos, ':'); in hs20_parse_icon()
1876 if (end == NULL || end - pos > 255) in hs20_parse_icon()
1878 os_memcpy(icon->name, pos, end - pos); in hs20_parse_icon()
1879 pos = end + 1; in hs20_parse_icon()
1881 if (os_strlen(pos) > 255) in hs20_parse_icon()
1883 os_memcpy(icon->file, pos, os_strlen(pos)); in hs20_parse_icon()
1892 char *pos, int line) in hs20_parse_osu_ssid() argument
1897 str = wpa_config_parse_string(pos, &slen); in hs20_parse_osu_ssid()
1899 wpa_printf(MSG_ERROR, "Line %d: Invalid SSID '%s'", line, pos); in hs20_parse_osu_ssid()
1913 char *pos, int line) in hs20_parse_osu_server_uri() argument
1926 bss->last_osu->server_uri = os_strdup(pos); in hs20_parse_osu_server_uri()
1933 char *pos, int line) in hs20_parse_osu_friendly_name() argument
1941 &bss->last_osu->friendly_name_count, pos)) { in hs20_parse_osu_friendly_name()
1943 line, pos); in hs20_parse_osu_friendly_name()
1952 char *pos, int line) in hs20_parse_osu_nai() argument
1960 bss->last_osu->osu_nai = os_strdup(pos); in hs20_parse_osu_nai()
1969 char *pos, int line) in hs20_parse_osu_nai2() argument
1977 bss->last_osu->osu_nai2 = os_strdup(pos); in hs20_parse_osu_nai2()
1986 static int hs20_parse_osu_method_list(struct hostapd_bss_config *bss, char *pos, in hs20_parse_osu_method_list() argument
1994 if (hostapd_parse_intlist(&bss->last_osu->method_list, pos)) { in hs20_parse_osu_method_list()
2003 static int hs20_parse_osu_icon(struct hostapd_bss_config *bss, char *pos, in hs20_parse_osu_icon() argument
2018 p->icons[p->icons_count] = os_strdup(pos); in hs20_parse_osu_icon()
2028 char *pos, int line) in hs20_parse_osu_service_desc() argument
2036 &bss->last_osu->service_desc_count, pos)) { in hs20_parse_osu_service_desc()
2038 line, pos); in hs20_parse_osu_service_desc()
2046 static int hs20_parse_operator_icon(struct hostapd_bss_config *bss, char *pos, in hs20_parse_operator_icon() argument
2056 bss->hs20_operator_icon[bss->hs20_operator_icon_count] = os_strdup(pos); in hs20_parse_operator_icon()
2069 char *pos) in hostapd_config_parse_acs_chan_bias() argument
2075 while (*pos) { in hostapd_config_parse_acs_chan_bias()
2081 bias[num].channel = atoi(pos); in hostapd_config_parse_acs_chan_bias()
2084 pos = os_strchr(pos, ':'); in hostapd_config_parse_acs_chan_bias()
2085 if (!pos) in hostapd_config_parse_acs_chan_bias()
2087 pos++; in hostapd_config_parse_acs_chan_bias()
2088 bias[num].bias = strtod(pos, &end); in hostapd_config_parse_acs_chan_bias()
2089 if (end == pos || bias[num].bias < 0.0) in hostapd_config_parse_acs_chan_bias()
2091 pos = end; in hostapd_config_parse_acs_chan_bias()
2092 if (*pos != ' ' && *pos != '\0') in hostapd_config_parse_acs_chan_bias()
2201 char *pos, *next; in add_airtime_weight() local
2208 pos = value; in add_airtime_weight()
2209 next = os_strchr(pos, ' '); in add_airtime_weight()
2212 if (!next || hwaddr_aton(pos, wt->addr)) { in add_airtime_weight()
2213 wpa_printf(MSG_ERROR, "Invalid station address: '%s'", pos); in add_airtime_weight()
2218 pos = next; in add_airtime_weight()
2219 wt->weight = atoi(pos); in add_airtime_weight()
2221 wpa_printf(MSG_ERROR, "Invalid weight: '%s'", pos); in add_airtime_weight()
2238 const char *pos = val, *pos2, *end = NULL; in parse_sae_password() local
2245 pos2 = os_strstr(pos, "|mac="); in parse_sae_password()
2251 pos = pos2 + ETH_ALEN * 3 - 1; in parse_sae_password()
2254 pos2 = os_strstr(pos, "|vlanid="); in parse_sae_password()
2263 pos2 = os_strstr(pos, "|pk="); in parse_sae_password()
2291 pos2 = os_strstr(pos, "|id="); in parse_sae_password()
2344 char buf[500], *pos; in parse_sae_password_file() local
2355 pos = os_strchr(buf, '\n'); in parse_sae_password_file()
2356 if (pos) in parse_sae_password_file()
2357 *pos = '\0'; in parse_sae_password_file()
2377 const char *pos) in hostapd_dpp_controller_parse() argument
2385 val = get_param(pos, "ipaddr="); in hostapd_dpp_controller_parse()
2389 val = get_param(pos, "pkhash="); in hostapd_dpp_controller_parse()
2422 static int get_u16(const char *pos, int line, u16 *ret_val) in get_u16() argument
2425 long int val = strtol(pos, &end, 0); in get_u16()
2429 line, pos); in get_u16()
2441 const char *buf, char *pos, int line) in hostapd_config_fill() argument
2444 os_strlcpy(conf->bss[0]->iface, pos, in hostapd_config_fill()
2447 os_strlcpy(bss->bridge, pos, sizeof(bss->bridge)); in hostapd_config_fill()
2449 bss->bridge_hairpin = atoi(pos); in hostapd_config_fill()
2451 os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge)); in hostapd_config_fill()
2453 os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge)); in hostapd_config_fill()
2459 if (os_strcmp(pos, wpa_drivers[j]->name) == 0) { in hostapd_config_fill()
2467 line, pos); in hostapd_config_fill()
2473 conf->driver_params = os_strdup(pos); in hostapd_config_fill()
2478 bss->logger_syslog_level = atoi(pos); in hostapd_config_fill()
2480 bss->logger_stdout_level = atoi(pos); in hostapd_config_fill()
2482 bss->logger_syslog = atoi(pos); in hostapd_config_fill()
2484 bss->logger_stdout = atoi(pos); in hostapd_config_fill()
2491 ssid->ssid_len = os_strlen(pos); in hostapd_config_fill()
2494 line, pos); in hostapd_config_fill()
2497 os_memcpy(ssid->ssid, pos, ssid->ssid_len); in hostapd_config_fill()
2503 char *str = wpa_config_parse_string(pos, &slen); in hostapd_config_fill()
2506 line, pos); in hostapd_config_fill()
2516 bss->ssid.utf8_ssid = atoi(pos) > 0; in hostapd_config_fill()
2518 enum macaddr_acl acl = atoi(pos); in hostapd_config_fill()
2529 if (hostapd_config_read_maclist(pos, &bss->accept_mac, in hostapd_config_fill()
2532 line, pos); in hostapd_config_fill()
2536 if (hostapd_config_read_maclist(pos, &bss->deny_mac, in hostapd_config_fill()
2539 line, pos); in hostapd_config_fill()
2543 bss->wds_sta = atoi(pos); in hostapd_config_fill()
2545 bss->start_disabled = atoi(pos); in hostapd_config_fill()
2547 bss->isolate = atoi(pos); in hostapd_config_fill()
2549 bss->ap_max_inactivity = atoi(pos); in hostapd_config_fill()
2551 bss->skip_inactivity_poll = atoi(pos); in hostapd_config_fill()
2553 int val = atoi(pos); in hostapd_config_fill()
2562 bss->max_acceptable_idle_period = atoi(pos); in hostapd_config_fill()
2564 int val = atoi(pos); in hostapd_config_fill()
2575 bss->config_id = os_strdup(pos); in hostapd_config_fill()
2577 if (pos[0] < 'A' || pos[0] > 'Z' || in hostapd_config_fill()
2578 pos[1] < 'A' || pos[1] > 'Z') { in hostapd_config_fill()
2581 line, pos); in hostapd_config_fill()
2584 os_memcpy(conf->country, pos, 2); in hostapd_config_fill()
2586 conf->country[2] = strtol(pos, NULL, 16); in hostapd_config_fill()
2588 conf->ieee80211d = atoi(pos); in hostapd_config_fill()
2590 conf->ieee80211h = atoi(pos); in hostapd_config_fill()
2592 bss->ieee802_1x = atoi(pos); in hostapd_config_fill()
2594 int eapol_version = atoi(pos); in hostapd_config_fill()
2604 line, eapol_version, pos); in hostapd_config_fill()
2611 bss->eap_server = atoi(pos); in hostapd_config_fill()
2614 bss->eap_server = atoi(pos); in hostapd_config_fill()
2616 if (hostapd_config_read_eap_user(pos, bss)) in hostapd_config_fill()
2620 bss->ca_cert = os_strdup(pos); in hostapd_config_fill()
2623 bss->server_cert = os_strdup(pos); in hostapd_config_fill()
2626 bss->server_cert2 = os_strdup(pos); in hostapd_config_fill()
2629 bss->private_key = os_strdup(pos); in hostapd_config_fill()
2632 bss->private_key2 = os_strdup(pos); in hostapd_config_fill()
2635 bss->private_key_passwd = os_strdup(pos); in hostapd_config_fill()
2638 bss->private_key_passwd2 = os_strdup(pos); in hostapd_config_fill()
2640 if (!pos[0]) { in hostapd_config_fill()
2642 line, pos); in hostapd_config_fill()
2646 bss->check_cert_subject = os_strdup(pos); in hostapd_config_fill()
2650 bss->check_crl = atoi(pos); in hostapd_config_fill()
2652 bss->check_crl_strict = atoi(pos); in hostapd_config_fill()
2654 bss->crl_reload_interval = atoi(pos); in hostapd_config_fill()
2656 bss->tls_session_lifetime = atoi(pos); in hostapd_config_fill()
2658 bss->tls_flags = parse_tls_flags(pos); in hostapd_config_fill()
2660 bss->max_auth_rounds = atoi(pos); in hostapd_config_fill()
2662 bss->max_auth_rounds_short = atoi(pos); in hostapd_config_fill()
2665 bss->ocsp_stapling_response = os_strdup(pos); in hostapd_config_fill()
2668 bss->ocsp_stapling_response_multi = os_strdup(pos); in hostapd_config_fill()
2671 bss->dh_file = os_strdup(pos); in hostapd_config_fill()
2674 bss->openssl_ciphers = os_strdup(pos); in hostapd_config_fill()
2677 bss->openssl_ecdh_curves = os_strdup(pos); in hostapd_config_fill()
2679 bss->fragment_size = atoi(pos); in hostapd_config_fill()
2689 } else if (hexstr2bin(pos, bss->pac_opaque_encr_key, 16)) { in hostapd_config_fill()
2695 size_t idlen = os_strlen(pos); in hostapd_config_fill()
2704 hexstr2bin(pos, bss->eap_fast_a_id, idlen / 2)) { in hostapd_config_fill()
2715 bss->eap_fast_a_id_info = os_strdup(pos); in hostapd_config_fill()
2717 bss->eap_fast_prov = atoi(pos); in hostapd_config_fill()
2719 bss->pac_key_lifetime = atoi(pos); in hostapd_config_fill()
2721 bss->pac_key_refresh_time = atoi(pos); in hostapd_config_fill()
2725 int val = atoi(pos); in hostapd_config_fill()
2735 bss->eap_teap_pac_no_inner = atoi(pos); in hostapd_config_fill()
2737 bss->eap_teap_separate_result = atoi(pos); in hostapd_config_fill()
2739 bss->eap_teap_id = atoi(pos); in hostapd_config_fill()
2741 bss->eap_teap_method_sequence = atoi(pos); in hostapd_config_fill()
2746 bss->eap_sim_db = os_strdup(pos); in hostapd_config_fill()
2748 bss->eap_sim_db_timeout = atoi(pos); in hostapd_config_fill()
2750 bss->eap_sim_aka_result_ind = atoi(pos); in hostapd_config_fill()
2752 bss->eap_sim_id = atoi(pos); in hostapd_config_fill()
2755 bss->imsi_privacy_key = os_strdup(pos); in hostapd_config_fill()
2757 bss->eap_sim_aka_fast_reauth_limit = atoi(pos); in hostapd_config_fill()
2761 bss->tnc = atoi(pos); in hostapd_config_fill()
2765 bss->pwd_group = atoi(pos); in hostapd_config_fill()
2769 bss->eap_server_erp = atoi(pos); in hostapd_config_fill()
2775 bss->eap_req_id_text = os_strdup(pos); in hostapd_config_fill()
2791 bss->erp_send_reauth_start = atoi(pos); in hostapd_config_fill()
2794 bss->erp_domain = os_strdup(pos); in hostapd_config_fill()
2797 int val = atoi(pos); in hostapd_config_fill()
2807 int val = atoi(pos); in hostapd_config_fill()
2817 bss->wep_rekeying_period = atoi(pos); in hostapd_config_fill()
2825 bss->eap_reauth_period = atoi(pos); in hostapd_config_fill()
2832 bss->eapol_key_index_workaround = atoi(pos); in hostapd_config_fill()
2838 if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) { in hostapd_config_fill()
2841 line, pos); in hostapd_config_fill()
2846 bss->nas_identifier = os_strdup(pos); in hostapd_config_fill()
2849 if (hostapd_parse_ip_addr(pos, &bss->radius->client_addr)) { in hostapd_config_fill()
2852 line, pos); in hostapd_config_fill()
2858 bss->radius->force_client_dev = os_strdup(pos); in hostapd_config_fill()
2862 &bss->radius->num_auth_servers, pos, 1812, in hostapd_config_fill()
2866 line, pos); in hostapd_config_fill()
2871 if (hostapd_parse_ip_addr(pos, in hostapd_config_fill()
2875 line, pos); in hostapd_config_fill()
2880 bss->radius->auth_server->port = atoi(pos); in hostapd_config_fill()
2883 int len = os_strlen(pos); in hostapd_config_fill()
2891 bss->radius->auth_server->shared_secret = (u8 *) os_strdup(pos); in hostapd_config_fill()
2895 if (os_strcmp(pos, "UDP") == 0) { in hostapd_config_fill()
2898 } else if (os_strcmp(pos, "TLS") == 0) { in hostapd_config_fill()
2903 line, pos); in hostapd_config_fill()
2910 bss->radius->auth_server->ca_cert = os_strdup(pos); in hostapd_config_fill()
2914 bss->radius->auth_server->client_cert = os_strdup(pos); in hostapd_config_fill()
2918 bss->radius->auth_server->private_key = os_strdup(pos); in hostapd_config_fill()
2922 bss->radius->auth_server->private_key_passwd = os_strdup(pos); in hostapd_config_fill()
2927 &bss->radius->num_acct_servers, pos, 1813, in hostapd_config_fill()
2931 line, pos); in hostapd_config_fill()
2936 if (hostapd_parse_ip_addr(pos, in hostapd_config_fill()
2940 line, pos); in hostapd_config_fill()
2945 bss->radius->acct_server->port = atoi(pos); in hostapd_config_fill()
2948 int len = os_strlen(pos); in hostapd_config_fill()
2956 bss->radius->acct_server->shared_secret = (u8 *) os_strdup(pos); in hostapd_config_fill()
2960 if (os_strcmp(pos, "UDP") == 0) { in hostapd_config_fill()
2963 } else if (os_strcmp(pos, "TLS") == 0) { in hostapd_config_fill()
2968 line, pos); in hostapd_config_fill()
2975 bss->radius->acct_server->ca_cert = os_strdup(pos); in hostapd_config_fill()
2979 bss->radius->acct_server->client_cert = os_strdup(pos); in hostapd_config_fill()
2983 bss->radius->acct_server->private_key = os_strdup(pos); in hostapd_config_fill()
2987 bss->radius->acct_server->private_key_passwd = os_strdup(pos); in hostapd_config_fill()
2990 bss->radius->retry_primary_interval = atoi(pos); in hostapd_config_fill()
2993 bss->radius_require_message_authenticator = atoi(pos); in hostapd_config_fill()
2995 bss->acct_interim_interval = atoi(pos); in hostapd_config_fill()
2997 bss->radius_request_cui = atoi(pos); in hostapd_config_fill()
3000 attr = hostapd_parse_radius_attr(pos); in hostapd_config_fill()
3016 attr = hostapd_parse_radius_attr(pos); in hostapd_config_fill()
3032 bss->radius_req_attr_sqlite = os_strdup(pos); in hostapd_config_fill()
3034 bss->radius_das_port = atoi(pos); in hostapd_config_fill()
3036 if (hostapd_parse_das_client(bss, pos) < 0) { in hostapd_config_fill()
3042 bss->radius_das_time_window = atoi(pos); in hostapd_config_fill()
3044 bss->radius_das_require_event_timestamp = atoi(pos); in hostapd_config_fill()
3047 bss->radius_das_require_message_authenticator = atoi(pos); in hostapd_config_fill()
3050 bss->auth_algs = atoi(pos); in hostapd_config_fill()
3057 bss->max_num_sta = atoi(pos); in hostapd_config_fill()
3065 bss->wpa = atoi(pos); in hostapd_config_fill()
3067 int val = atoi(pos); in hostapd_config_fill()
3077 bss->wpa_group_rekey = atoi(pos); in hostapd_config_fill()
3080 bss->wpa_strict_rekey = atoi(pos); in hostapd_config_fill()
3082 bss->wpa_gmk_rekey = atoi(pos); in hostapd_config_fill()
3084 bss->wpa_ptk_rekey = atoi(pos); in hostapd_config_fill()
3086 bss->wpa_deny_ptk0_rekey = atoi(pos); in hostapd_config_fill()
3096 unsigned long val = strtoul(pos, &endp, 0); in hostapd_config_fill()
3107 unsigned long val = strtoul(pos, &endp, 0); in hostapd_config_fill()
3117 bss->wpa_disable_eapol_key_retries = atoi(pos); in hostapd_config_fill()
3119 int len = os_strlen(pos); in hostapd_config_fill()
3126 bss->ssid.wpa_passphrase = os_strdup(pos); in hostapd_config_fill()
3136 if (hexstr2bin(pos, bss->ssid.wpa_psk->psk, PMK_LEN) || in hostapd_config_fill()
3137 pos[PMK_LEN * 2] != '\0') { in hostapd_config_fill()
3139 line, pos); in hostapd_config_fill()
3149 bss->ssid.wpa_psk_file = os_strdup(pos); in hostapd_config_fill()
3156 bss->wpa_key_mgmt = hostapd_config_parse_key_mgmt(line, pos); in hostapd_config_fill()
3160 bss->wpa_psk_radius = atoi(pos); in hostapd_config_fill()
3171 bss->wpa_pairwise = hostapd_config_parse_cipher(line, pos); in hostapd_config_fill()
3177 line, pos); in hostapd_config_fill()
3181 bss->rsn_pairwise = hostapd_config_parse_cipher(line, pos); in hostapd_config_fill()
3187 line, pos); in hostapd_config_fill()
3191 bss->group_cipher = hostapd_config_parse_cipher(line, pos); in hostapd_config_fill()
3201 line, pos); in hostapd_config_fill()
3206 bss->rsn_preauth = atoi(pos); in hostapd_config_fill()
3209 bss->rsn_preauth_interfaces = os_strdup(pos); in hostapd_config_fill()
3216 if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN || in hostapd_config_fill()
3217 hexstr2bin(pos, bss->mobility_domain, in hostapd_config_fill()
3221 line, pos); in hostapd_config_fill()
3225 if (os_strlen(pos) != 2 * FT_R1KH_ID_LEN || in hostapd_config_fill()
3226 hexstr2bin(pos, bss->r1_key_holder, FT_R1KH_ID_LEN) != 0) { in hostapd_config_fill()
3229 line, pos); in hostapd_config_fill()
3234 bss->r0_key_lifetime = atoi(pos) * 60; in hostapd_config_fill()
3236 bss->r0_key_lifetime = atoi(pos); in hostapd_config_fill()
3238 bss->r1_max_key_lifetime = atoi(pos); in hostapd_config_fill()
3240 bss->reassociation_deadline = atoi(pos); in hostapd_config_fill()
3242 bss->rkh_pos_timeout = atoi(pos); in hostapd_config_fill()
3244 bss->rkh_neg_timeout = atoi(pos); in hostapd_config_fill()
3246 bss->rkh_pull_timeout = atoi(pos); in hostapd_config_fill()
3248 bss->rkh_pull_retries = atoi(pos); in hostapd_config_fill()
3250 if (add_r0kh(bss, pos) < 0) { in hostapd_config_fill()
3252 line, pos); in hostapd_config_fill()
3256 if (add_r1kh(bss, pos) < 0) { in hostapd_config_fill()
3258 line, pos); in hostapd_config_fill()
3263 bss->rxkh_file = os_strdup(pos); in hostapd_config_fill()
3269 if (hostapd_config_read_rxkh_file(bss, pos)) { in hostapd_config_fill()
3272 line, pos); in hostapd_config_fill()
3277 bss->pmk_r1_push = atoi(pos); in hostapd_config_fill()
3279 bss->ft_over_ds = atoi(pos); in hostapd_config_fill()
3281 bss->ft_psk_generate_local = atoi(pos); in hostapd_config_fill()
3286 bss->ctrl_interface = os_strdup(pos); in hostapd_config_fill()
3291 const char *group = pos; in hostapd_config_fill()
3317 bss->radius_server_clients = os_strdup(pos); in hostapd_config_fill()
3319 bss->radius_server_auth_port = atoi(pos); in hostapd_config_fill()
3321 bss->radius_server_acct_port = atoi(pos); in hostapd_config_fill()
3323 bss->radius_server_ipv6 = atoi(pos); in hostapd_config_fill()
3326 bss->use_pae_group_addr = atoi(pos); in hostapd_config_fill()
3328 if (os_strcmp(pos, "a") == 0) in hostapd_config_fill()
3330 else if (os_strcmp(pos, "b") == 0) in hostapd_config_fill()
3332 else if (os_strcmp(pos, "g") == 0) in hostapd_config_fill()
3334 else if (os_strcmp(pos, "ad") == 0) in hostapd_config_fill()
3336 else if (os_strcmp(pos, "any") == 0) in hostapd_config_fill()
3340 line, pos); in hostapd_config_fill()
3345 if (os_strcmp(pos, "ad") == 0) in hostapd_config_fill()
3347 else if (os_strcmp(pos, "a") == 0) in hostapd_config_fill()
3349 else if (os_strcmp(pos, "g") == 0 || in hostapd_config_fill()
3350 os_strcmp(pos, "b") == 0) in hostapd_config_fill()
3352 else if (os_strcmp(pos, "ag") == 0 || in hostapd_config_fill()
3353 os_strcmp(pos, "ga") == 0) in hostapd_config_fill()
3358 line, pos); in hostapd_config_fill()
3362 conf->acs_exclude_dfs = atoi(pos); in hostapd_config_fill()
3364 conf->op_class = atoi(pos); in hostapd_config_fill()
3366 if (os_strcmp(pos, "acs_survey") == 0) { in hostapd_config_fill()
3376 conf->channel = atoi(pos); in hostapd_config_fill()
3380 conf->edmg_channel = atoi(pos); in hostapd_config_fill()
3382 conf->enable_edmg = atoi(pos); in hostapd_config_fill()
3384 if (hostapd_parse_chanlist(conf, pos)) { in hostapd_config_fill()
3390 if (freq_range_list_parse(&conf->acs_freq_list, pos)) { in hostapd_config_fill()
3397 conf->acs_exclude_6ghz_non_psc = atoi(pos); in hostapd_config_fill()
3399 conf->enable_background_radar = atoi(pos); in hostapd_config_fill()
3401 int val = atoi(pos); in hostapd_config_fill()
3411 int val = atoi(pos); in hostapd_config_fill()
3426 int val = atoi(pos); in hostapd_config_fill()
3434 if (hostapd_config_parse_acs_chan_bias(conf, pos)) { in hostapd_config_fill()
3441 int val = atoi(pos); in hostapd_config_fill()
3450 int val = atoi(pos); in hostapd_config_fill()
3460 int val = atoi(pos); in hostapd_config_fill()
3470 conf->rts_threshold = atoi(pos); in hostapd_config_fill()
3478 conf->fragm_threshold = atoi(pos); in hostapd_config_fill()
3489 int val = atoi(pos); in hostapd_config_fill()
3497 if (hostapd_parse_intlist(&conf->supported_rates, pos)) { in hostapd_config_fill()
3503 if (hostapd_parse_intlist(&conf->basic_rates, pos)) { in hostapd_config_fill()
3511 if (os_strncmp(pos, "ht:", 3) == 0) { in hostapd_config_fill()
3512 val = atoi(pos + 3); in hostapd_config_fill()
3521 } else if (os_strncmp(pos, "vht:", 4) == 0) { in hostapd_config_fill()
3522 val = atoi(pos + 4); in hostapd_config_fill()
3531 } else if (os_strncmp(pos, "he:", 3) == 0) { in hostapd_config_fill()
3532 val = atoi(pos + 3); in hostapd_config_fill()
3542 val = atoi(pos); in hostapd_config_fill()
3553 if (atoi(pos)) in hostapd_config_fill()
3558 bss->ignore_broadcast_ssid = atoi(pos); in hostapd_config_fill()
3560 bss->no_probe_resp_if_max_sta = atoi(pos); in hostapd_config_fill()
3563 bss->ssid.wep.idx = atoi(pos); in hostapd_config_fill()
3575 buf[7] - '0', pos)) { in hostapd_config_fill()
3583 bss->ssid.dynamic_vlan = atoi(pos); in hostapd_config_fill()
3585 bss->ssid.per_sta_vif = atoi(pos); in hostapd_config_fill()
3587 if (hostapd_config_read_vlan_file(bss, pos)) { in hostapd_config_fill()
3589 line, pos); in hostapd_config_fill()
3593 bss->ssid.vlan_naming = atoi(pos); in hostapd_config_fill()
3604 bss->ssid.vlan_tagged_interface = os_strdup(pos); in hostapd_config_fill()
3608 conf->ap_table_max_size = atoi(pos); in hostapd_config_fill()
3610 conf->ap_table_expiration_time = atoi(pos); in hostapd_config_fill()
3612 if (hostapd_config_tx_queue(conf->tx_queue, buf, pos)) { in hostapd_config_fill()
3619 bss->wmm_enabled = atoi(pos); in hostapd_config_fill()
3621 bss->wmm_uapsd = atoi(pos); in hostapd_config_fill()
3624 if (hostapd_config_wmm_ac(conf->wmm_ac_params, buf, pos)) { in hostapd_config_fill()
3630 if (hostapd_config_bss(conf, pos)) { in hostapd_config_fill()
3636 if (hwaddr_aton(pos, bss->bssid)) { in hostapd_config_fill()
3642 conf->use_driver_iface_addr = atoi(pos); in hostapd_config_fill()
3644 bss->ieee80211w = atoi(pos); in hostapd_config_fill()
3646 if (os_strcmp(pos, "AES-128-CMAC") == 0) { in hostapd_config_fill()
3648 } else if (os_strcmp(pos, "BIP-GMAC-128") == 0) { in hostapd_config_fill()
3650 } else if (os_strcmp(pos, "BIP-GMAC-256") == 0) { in hostapd_config_fill()
3652 } else if (os_strcmp(pos, "BIP-CMAC-256") == 0) { in hostapd_config_fill()
3656 line, pos); in hostapd_config_fill()
3660 bss->beacon_prot = atoi(pos); in hostapd_config_fill()
3662 bss->assoc_sa_query_max_timeout = atoi(pos); in hostapd_config_fill()
3669 bss->assoc_sa_query_retry_timeout = atoi(pos); in hostapd_config_fill()
3677 bss->ocv = atoi(pos); in hostapd_config_fill()
3682 conf->ieee80211n = atoi(pos); in hostapd_config_fill()
3684 if (hostapd_config_ht_capab(conf, pos) < 0) { in hostapd_config_fill()
3690 conf->require_ht = atoi(pos); in hostapd_config_fill()
3692 conf->ht_vht_twt_responder = atoi(pos); in hostapd_config_fill()
3694 conf->obss_interval = atoi(pos); in hostapd_config_fill()
3697 conf->ieee80211ac = atoi(pos); in hostapd_config_fill()
3699 if (hostapd_config_vht_capab(conf, pos) < 0) { in hostapd_config_fill()
3705 conf->require_vht = atoi(pos); in hostapd_config_fill()
3707 conf->vht_oper_chwidth = atoi(pos); in hostapd_config_fill()
3709 conf->vht_oper_centr_freq_seg0_idx = atoi(pos); in hostapd_config_fill()
3711 conf->vht_oper_centr_freq_seg1_idx = atoi(pos); in hostapd_config_fill()
3713 bss->vendor_vht = atoi(pos); in hostapd_config_fill()
3715 bss->use_sta_nsts = atoi(pos); in hostapd_config_fill()
3719 conf->ieee80211ax = atoi(pos); in hostapd_config_fill()
3721 conf->require_he = atoi(pos); in hostapd_config_fill()
3723 conf->he_phy_capab.he_su_beamformer = atoi(pos); in hostapd_config_fill()
3725 conf->he_phy_capab.he_su_beamformee = atoi(pos); in hostapd_config_fill()
3727 conf->he_phy_capab.he_mu_beamformer = atoi(pos); in hostapd_config_fill()
3729 conf->he_op.he_bss_color = atoi(pos) & 0x3f; in hostapd_config_fill()
3732 conf->he_op.he_bss_color_partial = atoi(pos); in hostapd_config_fill()
3734 conf->he_op.he_default_pe_duration = atoi(pos); in hostapd_config_fill()
3736 conf->he_op.he_twt_required = atoi(pos); in hostapd_config_fill()
3738 conf->he_op.he_twt_responder = atoi(pos); in hostapd_config_fill()
3740 conf->he_op.he_rts_threshold = atoi(pos); in hostapd_config_fill()
3742 conf->he_op.he_er_su_disable = atoi(pos); in hostapd_config_fill()
3744 conf->he_op.he_basic_mcs_nss_set = atoi(pos); in hostapd_config_fill()
3747 set_he_cap(atoi(pos), HE_QOS_INFO_EDCA_PARAM_SET_COUNT); in hostapd_config_fill()
3750 set_he_cap(atoi(pos), HE_QOS_INFO_Q_ACK); in hostapd_config_fill()
3753 set_he_cap(atoi(pos), HE_QOS_INFO_QUEUE_REQUEST); in hostapd_config_fill()
3756 set_he_cap(atoi(pos), HE_QOS_INFO_TXOP_REQUEST); in hostapd_config_fill()
3759 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3762 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3765 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3768 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3771 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3774 atoi(pos) & 0xff; in hostapd_config_fill()
3777 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3780 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3783 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3786 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3789 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3792 atoi(pos) & 0xff; in hostapd_config_fill()
3795 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3798 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3801 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3804 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3807 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3810 atoi(pos) & 0xff; in hostapd_config_fill()
3813 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3816 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3819 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3822 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3825 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3828 atoi(pos) & 0xff; in hostapd_config_fill()
3830 conf->spr.sr_control = atoi(pos) & 0x1f; in hostapd_config_fill()
3832 conf->spr.non_srg_obss_pd_max_offset = atoi(pos); in hostapd_config_fill()
3834 conf->spr.srg_obss_pd_min_offset = atoi(pos); in hostapd_config_fill()
3836 conf->spr.srg_obss_pd_max_offset = atoi(pos); in hostapd_config_fill()
3839 conf->spr.srg_bss_color_bitmap, pos)) { in hostapd_config_fill()
3842 line, pos); in hostapd_config_fill()
3847 conf->spr.srg_partial_bssid_bitmap, pos)) { in hostapd_config_fill()
3850 line, pos); in hostapd_config_fill()
3854 conf->he_6ghz_reg_pwr_type = atoi(pos); in hostapd_config_fill()
3862 conf->reg_def_cli_eirp_psd = atoi(pos); in hostapd_config_fill()
3864 conf->reg_sub_cli_eirp_psd = atoi(pos); in hostapd_config_fill()
3866 conf->reg_def_cli_eirp = atoi(pos); in hostapd_config_fill()
3868 conf->he_oper_chwidth = atoi(pos); in hostapd_config_fill()
3870 conf->he_oper_centr_freq_seg0_idx = atoi(pos); in hostapd_config_fill()
3872 conf->he_oper_centr_freq_seg1_idx = atoi(pos); in hostapd_config_fill()
3874 conf->he_6ghz_max_mpdu = atoi(pos); in hostapd_config_fill()
3876 conf->he_6ghz_max_ampdu_len_exp = atoi(pos); in hostapd_config_fill()
3878 conf->he_6ghz_rx_ant_pat = atoi(pos); in hostapd_config_fill()
3880 conf->he_6ghz_tx_ant_pat = atoi(pos); in hostapd_config_fill()
3882 int val = atoi(pos); in hostapd_config_fill()
3892 int mbssid = atoi(pos); in hostapd_config_fill()
3896 line, mbssid, pos); in hostapd_config_fill()
3902 bss->max_listen_interval = atoi(pos); in hostapd_config_fill()
3904 bss->disable_pmksa_caching = atoi(pos); in hostapd_config_fill()
3906 bss->okc = atoi(pos); in hostapd_config_fill()
3909 bss->wps_state = atoi(pos); in hostapd_config_fill()
3916 bss->wps_independent = atoi(pos); in hostapd_config_fill()
3918 bss->ap_setup_locked = atoi(pos); in hostapd_config_fill()
3920 if (uuid_str2bin(pos, bss->uuid)) { in hostapd_config_fill()
3926 bss->wps_pin_requests = os_strdup(pos); in hostapd_config_fill()
3928 if (os_strlen(pos) > WPS_DEV_NAME_MAX_LEN) { in hostapd_config_fill()
3934 bss->device_name = os_strdup(pos); in hostapd_config_fill()
3936 if (os_strlen(pos) > 64) { in hostapd_config_fill()
3942 bss->manufacturer = os_strdup(pos); in hostapd_config_fill()
3944 if (os_strlen(pos) > 32) { in hostapd_config_fill()
3950 bss->model_name = os_strdup(pos); in hostapd_config_fill()
3952 if (os_strlen(pos) > 32) { in hostapd_config_fill()
3958 bss->model_number = os_strdup(pos); in hostapd_config_fill()
3960 if (os_strlen(pos) > 32) { in hostapd_config_fill()
3966 bss->serial_number = os_strdup(pos); in hostapd_config_fill()
3968 if (wps_dev_type_str2bin(pos, bss->device_type)) in hostapd_config_fill()
3972 bss->config_methods = os_strdup(pos); in hostapd_config_fill()
3974 if (hexstr2bin(pos, bss->os_version, 4)) { in hostapd_config_fill()
3981 if (*pos == '\0') in hostapd_config_fill()
3984 bss->ap_pin = os_strdup(pos); in hostapd_config_fill()
3986 bss->skip_cred_build = atoi(pos); in hostapd_config_fill()
3989 bss->extra_cred = (u8 *) os_readfile(pos, &bss->extra_cred_len); in hostapd_config_fill()
3992 line, pos); in hostapd_config_fill()
3996 bss->wps_cred_processing = atoi(pos); in hostapd_config_fill()
3998 bss->wps_cred_add_sae = atoi(pos); in hostapd_config_fill()
4002 (u8 *) os_readfile(pos, &bss->ap_settings_len); in hostapd_config_fill()
4005 line, pos); in hostapd_config_fill()
4010 char *str = wpa_config_parse_string(pos, &slen); in hostapd_config_fill()
4014 line, pos); in hostapd_config_fill()
4023 int len = os_strlen(pos); in hostapd_config_fill()
4032 bss->multi_ap_backhaul_ssid.wpa_passphrase = os_strdup(pos); in hostapd_config_fill()
4045 if (hexstr2bin(pos, bss->multi_ap_backhaul_ssid.wpa_psk->psk, in hostapd_config_fill()
4047 pos[PMK_LEN * 2] != '\0') { in hostapd_config_fill()
4049 line, pos); in hostapd_config_fill()
4060 bss->upnp_iface = os_strdup(pos); in hostapd_config_fill()
4063 bss->friendly_name = os_strdup(pos); in hostapd_config_fill()
4066 bss->manufacturer_url = os_strdup(pos); in hostapd_config_fill()
4069 bss->model_description = os_strdup(pos); in hostapd_config_fill()
4072 bss->model_url = os_strdup(pos); in hostapd_config_fill()
4075 bss->upc = os_strdup(pos); in hostapd_config_fill()
4077 bss->pbc_in_m1 = atoi(pos); in hostapd_config_fill()
4080 bss->server_id = os_strdup(pos); in hostapd_config_fill()
4083 bss->wps_application_ext = wpabuf_parse_bin(pos); in hostapd_config_fill()
4086 bss->wps_nfc_dev_pw_id = atoi(pos); in hostapd_config_fill()
4096 bss->wps_nfc_dh_pubkey = wpabuf_parse_bin(pos); in hostapd_config_fill()
4100 bss->wps_nfc_dh_privkey = wpabuf_parse_bin(pos); in hostapd_config_fill()
4104 bss->wps_nfc_dev_pw = wpabuf_parse_bin(pos); in hostapd_config_fill()
4110 if (atoi(pos)) in hostapd_config_fill()
4115 if (atoi(pos)) in hostapd_config_fill()
4121 bss->disassoc_low_ack = atoi(pos); in hostapd_config_fill()
4123 if (atoi(pos)) in hostapd_config_fill()
4128 if (atoi(pos)) in hostapd_config_fill()
4135 rsn_testing = atoi(pos); in hostapd_config_fill()
4138 bss->time_advertisement = atoi(pos); in hostapd_config_fill()
4140 size_t tz_len = os_strlen(pos); in hostapd_config_fill()
4147 bss->time_zone = os_strdup(pos); in hostapd_config_fill()
4152 bss->wnm_sleep_mode = atoi(pos); in hostapd_config_fill()
4154 bss->wnm_sleep_mode_no_keys = atoi(pos); in hostapd_config_fill()
4156 bss->bss_transition = atoi(pos); in hostapd_config_fill()
4160 bss->interworking = atoi(pos); in hostapd_config_fill()
4162 bss->access_network_type = atoi(pos); in hostapd_config_fill()
4171 bss->internet = atoi(pos); in hostapd_config_fill()
4173 bss->asra = atoi(pos); in hostapd_config_fill()
4175 bss->esr = atoi(pos); in hostapd_config_fill()
4177 bss->uesa = atoi(pos); in hostapd_config_fill()
4179 bss->venue_group = atoi(pos); in hostapd_config_fill()
4182 bss->venue_type = atoi(pos); in hostapd_config_fill()
4185 if (hwaddr_aton(pos, bss->hessid)) { in hostapd_config_fill()
4190 if (parse_roaming_consortium(bss, pos, line) < 0) in hostapd_config_fill()
4193 if (parse_venue_name(bss, pos, line) < 0) in hostapd_config_fill()
4196 if (parse_venue_url(bss, pos, line) < 0) in hostapd_config_fill()
4201 if (hexstr2bin(pos, &auth_type, 1)) { in hostapd_config_fill()
4204 line, pos); in hostapd_config_fill()
4208 redirect_url_len = os_strlen(pos + 2); in hostapd_config_fill()
4218 os_memcpy(bss->network_auth_type + 3, pos + 2, in hostapd_config_fill()
4222 if (hexstr2bin(pos, &bss->ipaddr_type_availability, 1)) { in hostapd_config_fill()
4224 line, pos); in hostapd_config_fill()
4234 domain_list_len = os_strlen(pos) + 1; in hostapd_config_fill()
4240 tok_prev = pos; in hostapd_config_fill()
4246 tok_prev = pos; in hostapd_config_fill()
4267 if (parse_3gpp_cell_net(bss, pos, line) < 0) in hostapd_config_fill()
4270 if (parse_nai_realm(bss, pos, line) < 0) in hostapd_config_fill()
4273 if (parse_anqp_elem(bss, pos, line) < 0) in hostapd_config_fill()
4276 int val = atoi(pos); in hostapd_config_fill()
4281 line, pos); in hostapd_config_fill()
4286 bss->gas_comeback_delay = atoi(pos); in hostapd_config_fill()
4289 if (parse_qos_map_set(bss, pos, line) < 0) in hostapd_config_fill()
4294 bss->dump_msk_file = os_strdup(pos); in hostapd_config_fill()
4298 bss->proxy_arp = atoi(pos); in hostapd_config_fill()
4302 bss->hs20 = atoi(pos); in hostapd_config_fill()
4304 int val = atoi(pos); in hostapd_config_fill()
4309 line, pos); in hostapd_config_fill()
4314 bss->disable_dgaf = atoi(pos); in hostapd_config_fill()
4316 bss->na_mcast_to_ucast = atoi(pos); in hostapd_config_fill()
4318 bss->osen = atoi(pos); in hostapd_config_fill()
4320 bss->anqp_domain_id = atoi(pos); in hostapd_config_fill()
4322 bss->hs20_deauth_req_timeout = atoi(pos); in hostapd_config_fill()
4324 if (hs20_parse_oper_friendly_name(bss, pos, line) < 0) in hostapd_config_fill()
4327 if (hs20_parse_wan_metrics(bss, pos, line) < 0) in hostapd_config_fill()
4330 if (hs20_parse_conn_capab(bss, pos, line) < 0) { in hostapd_config_fill()
4336 oper_class_len = os_strlen(pos); in hostapd_config_fill()
4340 line, pos); in hostapd_config_fill()
4347 if (hexstr2bin(pos, oper_class, oper_class_len)) { in hostapd_config_fill()
4350 line, pos); in hostapd_config_fill()
4358 if (hs20_parse_icon(bss, pos) < 0) { in hostapd_config_fill()
4360 line, pos); in hostapd_config_fill()
4364 if (hs20_parse_osu_ssid(bss, pos, line) < 0) in hostapd_config_fill()
4367 if (hs20_parse_osu_server_uri(bss, pos, line) < 0) in hostapd_config_fill()
4370 if (hs20_parse_osu_friendly_name(bss, pos, line) < 0) in hostapd_config_fill()
4373 if (hs20_parse_osu_nai(bss, pos, line) < 0) in hostapd_config_fill()
4376 if (hs20_parse_osu_nai2(bss, pos, line) < 0) in hostapd_config_fill()
4379 if (hs20_parse_osu_method_list(bss, pos, line) < 0) in hostapd_config_fill()
4382 if (hs20_parse_osu_icon(bss, pos, line) < 0) in hostapd_config_fill()
4385 if (hs20_parse_osu_service_desc(bss, pos, line) < 0) in hostapd_config_fill()
4388 if (hs20_parse_operator_icon(bss, pos, line) < 0) in hostapd_config_fill()
4392 bss->subscr_remediation_url = os_strdup(pos); in hostapd_config_fill()
4394 bss->subscr_remediation_method = atoi(pos); in hostapd_config_fill()
4397 bss->t_c_filename = os_strdup(pos); in hostapd_config_fill()
4399 bss->t_c_timestamp = strtol(pos, NULL, 0); in hostapd_config_fill()
4402 bss->t_c_server_url = os_strdup(pos); in hostapd_config_fill()
4405 bss->hs20_sim_provisioning_url = os_strdup(pos); in hostapd_config_fill()
4409 bss->mbo_enabled = atoi(pos); in hostapd_config_fill()
4411 bss->mbo_cell_data_conn_pref = atoi(pos); in hostapd_config_fill()
4413 bss->oce = atoi(pos); in hostapd_config_fill()
4420 conf->_val = strtod(pos, &end); \ in hostapd_config_fill()
4425 line, pos); \ in hostapd_config_fill()
4434 conf->ecsa_ie_only = atoi(pos); in hostapd_config_fill()
4436 WPA_PUT_LE16(bss->bss_load_test, atoi(pos)); in hostapd_config_fill()
4437 pos = os_strchr(pos, ':'); in hostapd_config_fill()
4438 if (pos == NULL) { in hostapd_config_fill()
4443 pos++; in hostapd_config_fill()
4444 bss->bss_load_test[2] = atoi(pos); in hostapd_config_fill()
4445 pos = os_strchr(pos, ':'); in hostapd_config_fill()
4446 if (pos == NULL) { in hostapd_config_fill()
4451 pos++; in hostapd_config_fill()
4452 WPA_PUT_LE16(&bss->bss_load_test[3], atoi(pos)); in hostapd_config_fill()
4459 int val = atoi(pos); in hostapd_config_fill()
4466 size_t len = os_strlen(pos) / 2; in hostapd_config_fill()
4472 if (hexstr2bin(pos, wpabuf_put(tmp, len), len)) { in hostapd_config_fill()
4476 line, pos); in hostapd_config_fill()
4483 bss->sae_reflection_attack = atoi(pos); in hostapd_config_fill()
4485 bss->sae_commit_status = atoi(pos); in hostapd_config_fill()
4487 bss->sae_pk_omit = atoi(pos); in hostapd_config_fill()
4489 bss->sae_pk_password_check_skip = atoi(pos); in hostapd_config_fill()
4492 bss->sae_commit_override = wpabuf_parse_bin(pos); in hostapd_config_fill()
4495 bss->rsne_override_eapol = wpabuf_parse_bin(pos); in hostapd_config_fill()
4498 bss->rsnxe_override_eapol = wpabuf_parse_bin(pos); in hostapd_config_fill()
4501 bss->rsne_override_ft = wpabuf_parse_bin(pos); in hostapd_config_fill()
4504 bss->rsnxe_override_ft = wpabuf_parse_bin(pos); in hostapd_config_fill()
4507 bss->gtk_rsc_override = wpabuf_parse_bin(pos); in hostapd_config_fill()
4510 bss->igtk_rsc_override = wpabuf_parse_bin(pos); in hostapd_config_fill()
4512 bss->no_beacon_rsnxe = atoi(pos); in hostapd_config_fill()
4514 bss->skip_prune_assoc = atoi(pos); in hostapd_config_fill()
4516 bss->ft_rsnxe_used = atoi(pos); in hostapd_config_fill()
4518 bss->oci_freq_override_eapol_m3 = atoi(pos); in hostapd_config_fill()
4520 bss->oci_freq_override_eapol_g1 = atoi(pos); in hostapd_config_fill()
4522 bss->oci_freq_override_saquery_req = atoi(pos); in hostapd_config_fill()
4524 bss->oci_freq_override_saquery_resp = atoi(pos); in hostapd_config_fill()
4526 bss->oci_freq_override_ft_assoc = atoi(pos); in hostapd_config_fill()
4528 bss->oci_freq_override_fils_assoc = atoi(pos); in hostapd_config_fill()
4530 bss->oci_freq_override_wnm_sleep = atoi(pos); in hostapd_config_fill()
4532 bss->eap_skip_prot_success = atoi(pos); in hostapd_config_fill()
4534 conf->delay_eapol_tx = atoi(pos); in hostapd_config_fill()
4536 if (parse_wpabuf_hex(line, buf, &bss->eapol_m1_elements, pos)) in hostapd_config_fill()
4539 if (parse_wpabuf_hex(line, buf, &bss->eapol_m3_elements, pos)) in hostapd_config_fill()
4542 bss->eapol_m3_no_encrypt = atoi(pos); in hostapd_config_fill()
4544 bss->test_assoc_comeback_type = atoi(pos); in hostapd_config_fill()
4546 if (parse_wpabuf_hex(line, buf, &bss->presp_elements, pos)) in hostapd_config_fill()
4551 if (parse_sae_password(bss, pos) < 0) { in hostapd_config_fill()
4557 if (parse_sae_password_file(bss, pos) < 0) { in hostapd_config_fill()
4565 if (parse_wpabuf_hex(line, buf, &bss->vendor_elements, pos)) in hostapd_config_fill()
4568 if (parse_wpabuf_hex(line, buf, &bss->assocresp_elements, pos)) in hostapd_config_fill()
4572 bss->anti_clogging_threshold = atoi(pos); in hostapd_config_fill()
4574 bss->sae_sync = atoi(pos); in hostapd_config_fill()
4576 if (hostapd_parse_intlist(&bss->sae_groups, pos)) { in hostapd_config_fill()
4579 line, pos); in hostapd_config_fill()
4583 bss->sae_require_mfp = atoi(pos); in hostapd_config_fill()
4585 bss->sae_confirm_immediate = atoi(pos); in hostapd_config_fill()
4587 bss->sae_pwe = atoi(pos); in hostapd_config_fill()
4589 int val = atoi(pos); in hostapd_config_fill()
4597 conf->spectrum_mgmt_required = atoi(pos); in hostapd_config_fill()
4600 bss->wowlan_triggers = os_strdup(pos); in hostapd_config_fill()
4603 size_t len = os_strlen(pos); in hostapd_config_fill()
4608 line, pos); in hostapd_config_fill()
4615 line, pos); in hostapd_config_fill()
4619 os_strlcpy(conf->fst_cfg.group_id, pos, in hostapd_config_fill()
4625 if (!*pos) { in hostapd_config_fill()
4632 val = strtol(pos, &endp, 0); in hostapd_config_fill()
4636 line, val, pos, FST_MAX_PRIO_VALUE); in hostapd_config_fill()
4644 if (!*pos) { in hostapd_config_fill()
4650 val = strtol(pos, &endp, 0); in hostapd_config_fill()
4655 line, val, pos, FST_MAX_LLT_MS); in hostapd_config_fill()
4661 conf->track_sta_max_num = atoi(pos); in hostapd_config_fill()
4663 conf->track_sta_max_age = atoi(pos); in hostapd_config_fill()
4666 bss->no_probe_resp_if_seen_on = os_strdup(pos); in hostapd_config_fill()
4669 bss->no_auth_if_seen_on = os_strdup(pos); in hostapd_config_fill()
4672 conf->lci = wpabuf_parse_bin(pos); in hostapd_config_fill()
4679 conf->civic = wpabuf_parse_bin(pos); in hostapd_config_fill()
4685 if (atoi(pos)) in hostapd_config_fill()
4689 if (atoi(pos)) in hostapd_config_fill()
4695 if (atoi(pos)) in hostapd_config_fill()
4699 bss->gas_address3 = atoi(pos); in hostapd_config_fill()
4701 conf->stationary_ap = atoi(pos); in hostapd_config_fill()
4703 bss->ftm_responder = atoi(pos); in hostapd_config_fill()
4705 bss->ftm_initiator = atoi(pos); in hostapd_config_fill()
4708 if (hexstr2bin(pos, bss->fils_cache_id, FILS_CACHE_ID_LEN)) { in hostapd_config_fill()
4711 line, pos); in hostapd_config_fill()
4716 if (parse_fils_realm(bss, pos) < 0) in hostapd_config_fill()
4719 bss->fils_dh_group = atoi(pos); in hostapd_config_fill()
4721 if (hostapd_parse_ip_addr(pos, &bss->dhcp_server)) { in hostapd_config_fill()
4724 line, pos); in hostapd_config_fill()
4728 bss->dhcp_rapid_commit_proxy = atoi(pos); in hostapd_config_fill()
4730 bss->fils_hlp_wait_time = atoi(pos); in hostapd_config_fill()
4732 bss->dhcp_server_port = atoi(pos); in hostapd_config_fill()
4734 bss->dhcp_relay_port = atoi(pos); in hostapd_config_fill()
4736 bss->fils_discovery_min_int = atoi(pos); in hostapd_config_fill()
4738 bss->fils_discovery_max_int = atoi(pos); in hostapd_config_fill()
4741 bss->multicast_to_unicast = atoi(pos); in hostapd_config_fill()
4743 bss->bridge_multicast_to_unicast = atoi(pos); in hostapd_config_fill()
4745 bss->broadcast_deauth = atoi(pos); in hostapd_config_fill()
4747 bss->notify_mgmt_frames = atoi(pos); in hostapd_config_fill()
4751 bss->dpp_name = os_strdup(pos); in hostapd_config_fill()
4754 bss->dpp_mud_url = os_strdup(pos); in hostapd_config_fill()
4757 bss->dpp_extra_conf_req_name = os_strdup(pos); in hostapd_config_fill()
4760 bss->dpp_extra_conf_req_value = os_strdup(pos); in hostapd_config_fill()
4763 bss->dpp_connector = os_strdup(pos); in hostapd_config_fill()
4765 if (parse_wpabuf_hex(line, buf, &bss->dpp_netaccesskey, pos)) in hostapd_config_fill()
4768 bss->dpp_netaccesskey_expiry = strtol(pos, NULL, 0); in hostapd_config_fill()
4770 if (parse_wpabuf_hex(line, buf, &bss->dpp_csign, pos)) in hostapd_config_fill()
4774 if (hostapd_dpp_controller_parse(bss, pos)) in hostapd_config_fill()
4777 bss->dpp_relay_port = atoi(pos); in hostapd_config_fill()
4779 bss->dpp_configurator_connectivity = atoi(pos); in hostapd_config_fill()
4781 int val = atoi(pos); in hostapd_config_fill()
4786 line, pos); in hostapd_config_fill()
4794 if (hwaddr_aton(pos, bss->owe_transition_bssid)) { in hostapd_config_fill()
4802 char *str = wpa_config_parse_string(pos, &slen); in hostapd_config_fill()
4806 line, pos); in hostapd_config_fill()
4814 os_strlcpy(bss->owe_transition_ifname, pos, in hostapd_config_fill()
4817 if (hostapd_parse_intlist(&bss->owe_groups, pos)) { in hostapd_config_fill()
4820 line, pos); in hostapd_config_fill()
4824 bss->owe_ptk_workaround = atoi(pos); in hostapd_config_fill()
4827 bss->coloc_intf_reporting = atoi(pos); in hostapd_config_fill()
4829 int val = atoi(pos); in hostapd_config_fill()
4839 int val = atoi(pos); in hostapd_config_fill()
4849 int val = atoi(pos); in hostapd_config_fill()
4859 int val = atoi(pos); in hostapd_config_fill()
4869 conf->rssi_reject_assoc_rssi = atoi(pos); in hostapd_config_fill()
4871 conf->rssi_reject_assoc_timeout = atoi(pos); in hostapd_config_fill()
4873 conf->rssi_ignore_probe_request = atoi(pos); in hostapd_config_fill()
4875 bss->pbss = atoi(pos); in hostapd_config_fill()
4877 bss->transition_disable = strtol(pos, NULL, 16); in hostapd_config_fill()
4880 int val = atoi(pos); in hostapd_config_fill()
4889 conf->airtime_update_interval = atoi(pos); in hostapd_config_fill()
4891 bss->airtime_weight = atoi(pos); in hostapd_config_fill()
4893 int val = atoi(pos); in hostapd_config_fill()
4903 if (add_airtime_weight(bss, pos) < 0) { in hostapd_config_fill()
4906 line, pos); in hostapd_config_fill()
4912 int macsec_policy = atoi(pos); in hostapd_config_fill()
4917 line, macsec_policy, pos); in hostapd_config_fill()
4922 int macsec_integ_only = atoi(pos); in hostapd_config_fill()
4927 line, macsec_integ_only, pos); in hostapd_config_fill()
4932 int macsec_replay_protect = atoi(pos); in hostapd_config_fill()
4937 line, macsec_replay_protect, pos); in hostapd_config_fill()
4942 bss->macsec_replay_window = atoi(pos); in hostapd_config_fill()
4944 int macsec_offload = atoi(pos); in hostapd_config_fill()
4949 line, macsec_offload, pos); in hostapd_config_fill()
4954 int macsec_port = atoi(pos); in hostapd_config_fill()
4959 line, macsec_port, pos); in hostapd_config_fill()
4964 int mka_priority = atoi(pos); in hostapd_config_fill()
4969 line, mka_priority, pos); in hostapd_config_fill()
4974 int macsec_csindex = atoi(pos); in hostapd_config_fill()
4979 line, macsec_csindex, pos); in hostapd_config_fill()
4984 size_t len = os_strlen(pos); in hostapd_config_fill()
4988 hexstr2bin(pos, bss->mka_cak, len / 2)) { in hostapd_config_fill()
4990 line, pos); in hostapd_config_fill()
4996 size_t len = os_strlen(pos); in hostapd_config_fill()
5002 line, pos); in hostapd_config_fill()
5006 if (hexstr2bin(pos, bss->mka_ckn, bss->mka_ckn_len)) { in hostapd_config_fill()
5008 line, pos); in hostapd_config_fill()
5014 bss->disable_11n = !!atoi(pos); in hostapd_config_fill()
5016 bss->disable_11ac = !!atoi(pos); in hostapd_config_fill()
5018 bss->disable_11ax = !!atoi(pos); in hostapd_config_fill()
5020 bss->disable_11be = !!atoi(pos); in hostapd_config_fill()
5024 bss->force_kdk_derivation = atoi(pos); in hostapd_config_fill()
5026 bss->pasn_corrupt_mic = atoi(pos); in hostapd_config_fill()
5029 if (hostapd_parse_intlist(&bss->pasn_groups, pos)) { in hostapd_config_fill()
5032 line, pos); in hostapd_config_fill()
5036 bss->pasn_comeback_after = atoi(pos); in hostapd_config_fill()
5038 bss->pasn_noauth = atoi(pos); in hostapd_config_fill()
5042 line, "ext_capa_mask", pos)) in hostapd_config_fill()
5046 line, "ext_capa", pos)) in hostapd_config_fill()
5049 bss->rnr = atoi(pos); in hostapd_config_fill()
5051 int val = atoi(pos); in hostapd_config_fill()
5058 conf->ieee80211be = atoi(pos); in hostapd_config_fill()
5060 conf->eht_oper_chwidth = atoi(pos); in hostapd_config_fill()
5062 conf->eht_oper_centr_freq_seg0_idx = atoi(pos); in hostapd_config_fill()
5064 conf->eht_phy_capab.su_beamformer = atoi(pos); in hostapd_config_fill()
5066 conf->eht_phy_capab.su_beamformee = atoi(pos); in hostapd_config_fill()
5068 conf->eht_phy_capab.mu_beamformer = atoi(pos); in hostapd_config_fill()
5070 conf->eht_default_pe_duration = atoi(pos); in hostapd_config_fill()
5072 if (get_u16(pos, line, &conf->punct_bitmap)) in hostapd_config_fill()
5075 int val = atoi(pos); in hostapd_config_fill()
5085 bss->mld_ap = !!atoi(pos); in hostapd_config_fill()
5087 if (hwaddr_aton(pos, bss->mld_addr)) { in hostapd_config_fill()
5093 conf->eht_bw320_offset = atoi(pos); in hostapd_config_fill()
5096 if (get_u16(pos, line, &bss->eht_oper_puncturing_override)) in hostapd_config_fill()
5099 bss->mld_indicate_disabled = atoi(pos); in hostapd_config_fill()
5122 char buf[4096], *pos; in hostapd_config_read() local
5159 pos = buf; in hostapd_config_read()
5160 while (*pos != '\0') { in hostapd_config_read()
5161 if (*pos == '\n') { in hostapd_config_read()
5162 *pos = '\0'; in hostapd_config_read()
5165 pos++; in hostapd_config_read()
5170 pos = os_strchr(buf, '='); in hostapd_config_read()
5171 if (pos == NULL) { in hostapd_config_read()
5177 *pos = '\0'; in hostapd_config_read()
5178 pos++; in hostapd_config_read()
5179 errors += hostapd_config_fill(conf, bss, buf, pos, line); in hostapd_config_read()