• Home
  • Raw
  • Download

Lines Matching refs:pos

40 	char buf[128], *pos, *pos2, *pos3;  in hostapd_config_read_vlan_file()  local
55 pos = buf; in hostapd_config_read_vlan_file()
56 while (*pos != '\0') { in hostapd_config_read_vlan_file()
57 if (*pos == '\n') { in hostapd_config_read_vlan_file()
58 *pos = '\0'; in hostapd_config_read_vlan_file()
61 pos++; in hostapd_config_read_vlan_file()
68 pos = buf + 1; in hostapd_config_read_vlan_file()
70 vlan_id = strtol(buf, &pos, 10); in hostapd_config_read_vlan_file()
71 if (buf == pos || vlan_id < 1 || in hostapd_config_read_vlan_file()
80 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_vlan_file()
81 pos++; in hostapd_config_read_vlan_file()
82 pos2 = pos; in hostapd_config_read_vlan_file()
89 if (*pos == '\0' || os_strlen(pos) > IFNAMSIZ) { in hostapd_config_read_vlan_file()
114 os_strlcpy(vlan->ifname, pos, sizeof(vlan->ifname)); in hostapd_config_read_vlan_file()
177 char buf[128], *pos; in hostapd_config_read_maclist() local
195 pos = buf; in hostapd_config_read_maclist()
196 while (*pos != '\0') { in hostapd_config_read_maclist()
197 if (*pos == '\n') { in hostapd_config_read_maclist()
198 *pos = '\0'; in hostapd_config_read_maclist()
201 pos++; in hostapd_config_read_maclist()
205 pos = buf; in hostapd_config_read_maclist()
208 pos++; in hostapd_config_read_maclist()
211 if (hwaddr_aton(pos, addr)) { in hostapd_config_read_maclist()
213 "line %d in '%s'", pos, line, fname); in hostapd_config_read_maclist()
223 pos = buf; in hostapd_config_read_maclist()
224 while (*pos != '\0' && *pos != ' ' && *pos != '\t') in hostapd_config_read_maclist()
225 pos++; in hostapd_config_read_maclist()
226 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_maclist()
227 pos++; in hostapd_config_read_maclist()
228 if (*pos != '\0') in hostapd_config_read_maclist()
229 vlan_id = atoi(pos); in hostapd_config_read_maclist()
250 char **pos, int line, in hostapd_config_eap_user_salted() argument
253 char *pos2 = *pos; in hostapd_config_eap_user_salted()
258 if (pos2 - *pos < (int) (2 * (len + 1))) { /* at least 1 byte of salt */ in hostapd_config_eap_user_salted()
273 if (hexstr2bin(*pos, user->password, len) < 0) { in hostapd_config_eap_user_salted()
280 *pos += 2 * len; in hostapd_config_eap_user_salted()
282 user->salt_len = (pos2 - *pos) / 2; in hostapd_config_eap_user_salted()
291 if (hexstr2bin(*pos, user->salt, user->salt_len) < 0) { in hostapd_config_eap_user_salted()
298 *pos = pos2; in hostapd_config_eap_user_salted()
307 char buf[512], *pos, *start, *pos2; in hostapd_config_read_eap_user() local
335 pos = buf; in hostapd_config_read_eap_user()
336 while (*pos != '\0') { in hostapd_config_read_eap_user()
337 if (*pos == '\n') { in hostapd_config_read_eap_user()
338 *pos = '\0'; in hostapd_config_read_eap_user()
341 pos++; in hostapd_config_read_eap_user()
384 pos = buf; in hostapd_config_read_eap_user()
386 pos = buf + 1; in hostapd_config_read_eap_user()
387 start = pos; in hostapd_config_read_eap_user()
388 while (*pos != '"' && *pos != '\0') in hostapd_config_read_eap_user()
389 pos++; in hostapd_config_read_eap_user()
390 if (*pos == '\0') { in hostapd_config_read_eap_user()
397 user->identity = os_memdup(start, pos - start); in hostapd_config_read_eap_user()
403 user->identity_len = pos - start; in hostapd_config_read_eap_user()
405 if (pos[0] == '"' && pos[1] == '*') { in hostapd_config_read_eap_user()
407 pos++; in hostapd_config_read_eap_user()
410 pos++; in hostapd_config_read_eap_user()
411 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_eap_user()
412 pos++; in hostapd_config_read_eap_user()
414 if (*pos == '\0') { in hostapd_config_read_eap_user()
420 start = pos; in hostapd_config_read_eap_user()
421 while (*pos != ' ' && *pos != '\t' && *pos != '\0') in hostapd_config_read_eap_user()
422 pos++; in hostapd_config_read_eap_user()
423 if (*pos == '\0') { in hostapd_config_read_eap_user()
424 pos = NULL; in hostapd_config_read_eap_user()
426 *pos = '\0'; in hostapd_config_read_eap_user()
427 pos++; in hostapd_config_read_eap_user()
485 if (pos == NULL) in hostapd_config_read_eap_user()
488 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_eap_user()
489 pos++; in hostapd_config_read_eap_user()
490 if (*pos == '\0') in hostapd_config_read_eap_user()
493 if (os_strncmp(pos, "[ver=0]", 7) == 0) { in hostapd_config_read_eap_user()
498 if (os_strncmp(pos, "[ver=1]", 7) == 0) { in hostapd_config_read_eap_user()
503 if (os_strncmp(pos, "[2]", 3) == 0) { in hostapd_config_read_eap_user()
508 if (*pos == '"') { in hostapd_config_read_eap_user()
509 pos++; in hostapd_config_read_eap_user()
510 start = pos; in hostapd_config_read_eap_user()
511 while (*pos != '"' && *pos != '\0') in hostapd_config_read_eap_user()
512 pos++; in hostapd_config_read_eap_user()
513 if (*pos == '\0') { in hostapd_config_read_eap_user()
520 user->password = os_memdup(start, pos - start); in hostapd_config_read_eap_user()
526 user->password_len = pos - start; in hostapd_config_read_eap_user()
528 pos++; in hostapd_config_read_eap_user()
529 } else if (os_strncmp(pos, "hash:", 5) == 0) { in hostapd_config_read_eap_user()
530 pos += 5; in hostapd_config_read_eap_user()
531 pos2 = pos; in hostapd_config_read_eap_user()
535 if (pos2 - pos != 32) { in hostapd_config_read_eap_user()
546 if (hexstr2bin(pos, user->password, 16) < 0) { in hostapd_config_read_eap_user()
553 pos = pos2; in hostapd_config_read_eap_user()
554 } else if (os_strncmp(pos, "ssha1:", 6) == 0) { in hostapd_config_read_eap_user()
555 pos += 6; in hostapd_config_read_eap_user()
557 &pos, in hostapd_config_read_eap_user()
560 } else if (os_strncmp(pos, "ssha256:", 8) == 0) { in hostapd_config_read_eap_user()
561 pos += 8; in hostapd_config_read_eap_user()
563 &pos, in hostapd_config_read_eap_user()
566 } else if (os_strncmp(pos, "ssha512:", 8) == 0) { in hostapd_config_read_eap_user()
567 pos += 8; in hostapd_config_read_eap_user()
569 &pos, in hostapd_config_read_eap_user()
573 pos2 = pos; in hostapd_config_read_eap_user()
577 if ((pos2 - pos) & 1) { in hostapd_config_read_eap_user()
582 user->password = os_malloc((pos2 - pos) / 2); in hostapd_config_read_eap_user()
588 if (hexstr2bin(pos, user->password, in hostapd_config_read_eap_user()
589 (pos2 - pos) / 2) < 0) { in hostapd_config_read_eap_user()
594 user->password_len = (pos2 - pos) / 2; in hostapd_config_read_eap_user()
595 pos = pos2; in hostapd_config_read_eap_user()
598 while (*pos == ' ' || *pos == '\t') in hostapd_config_read_eap_user()
599 pos++; in hostapd_config_read_eap_user()
600 if (os_strncmp(pos, "[2]", 3) == 0) { in hostapd_config_read_eap_user()
666 const char *pos; in hostapd_parse_radius_attr() local
677 pos = os_strchr(value, ':'); in hostapd_parse_radius_attr()
678 if (pos == NULL) { in hostapd_parse_radius_attr()
688 pos++; in hostapd_parse_radius_attr()
689 if (pos[0] == '\0' || pos[1] != ':') { in hostapd_parse_radius_attr()
693 syntax = *pos++; in hostapd_parse_radius_attr()
694 pos++; in hostapd_parse_radius_attr()
698 attr->val = wpabuf_alloc_copy(pos, os_strlen(pos)); in hostapd_parse_radius_attr()
701 len = os_strlen(pos); in hostapd_parse_radius_attr()
708 if (hexstr2bin(pos, wpabuf_put(attr->val, len), len) < 0) { in hostapd_parse_radius_attr()
717 wpabuf_put_be32(attr->val, atoi(pos)); in hostapd_parse_radius_attr()
929 char *pos; in hostapd_parse_chanlist() local
932 pos = val; in hostapd_parse_chanlist()
933 while (pos) { in hostapd_parse_chanlist()
934 pos = os_strchr(pos, ' '); in hostapd_parse_chanlist()
935 if (pos) in hostapd_parse_chanlist()
936 *pos++ = ','; in hostapd_parse_chanlist()
949 char *pos, *end; in hostapd_parse_intlist() local
954 pos = val; in hostapd_parse_intlist()
956 while (*pos != '\0') { in hostapd_parse_intlist()
957 if (*pos == ' ') in hostapd_parse_intlist()
959 pos++; in hostapd_parse_intlist()
965 pos = val; in hostapd_parse_intlist()
967 while (*pos != '\0') { in hostapd_parse_intlist()
968 end = os_strchr(pos, ' '); in hostapd_parse_intlist()
972 list[count++] = atoi(pos); in hostapd_parse_intlist()
975 pos = end + 1; in hostapd_parse_intlist()
1027 char *pos; in hostapd_config_read_int10() local
1030 pos = os_strchr(value, '.'); in hostapd_config_read_int10()
1032 if (pos) { in hostapd_config_read_int10()
1033 pos++; in hostapd_config_read_int10()
1034 if (*pos >= '0' && *pos <= '9') in hostapd_config_read_int10()
1035 d = *pos - '0'; in hostapd_config_read_int10()
1062 const char *pos; in hostapd_config_tx_queue() local
1066 pos = name + 9; in hostapd_config_tx_queue()
1067 if (os_strncmp(pos, "data", 4) == 0 && in hostapd_config_tx_queue()
1068 pos[4] >= '0' && pos[4] <= '9' && pos[5] == '_') { in hostapd_config_tx_queue()
1069 num = pos[4] - '0'; in hostapd_config_tx_queue()
1070 pos += 6; in hostapd_config_tx_queue()
1071 } else if (os_strncmp(pos, "after_beacon_", 13) == 0 || in hostapd_config_tx_queue()
1072 os_strncmp(pos, "beacon_", 7) == 0) { in hostapd_config_tx_queue()
1076 wpa_printf(MSG_ERROR, "Unknown tx_queue name '%s'", pos); in hostapd_config_tx_queue()
1088 if (os_strcmp(pos, "aifs") == 0) { in hostapd_config_tx_queue()
1095 } else if (os_strcmp(pos, "cwmin") == 0) { in hostapd_config_tx_queue()
1102 } else if (os_strcmp(pos, "cwmax") == 0) { in hostapd_config_tx_queue()
1109 } else if (os_strcmp(pos, "burst") == 0) { in hostapd_config_tx_queue()
1112 wpa_printf(MSG_ERROR, "Unknown tx_queue field '%s'", pos); in hostapd_config_tx_queue()
1122 static int rkh_derive_key(const char *pos, u8 *key, size_t key_len) in rkh_derive_key() argument
1127 if (!hexstr2bin(pos, key, key_len)) in rkh_derive_key()
1131 if (hexstr2bin(pos, oldkey, sizeof(oldkey))) in rkh_derive_key()
1144 char *pos, *next; in add_r0kh() local
1151 pos = value; in add_r0kh()
1152 next = os_strchr(pos, ' '); in add_r0kh()
1155 if (next == NULL || hwaddr_aton(pos, r0kh->addr)) { in add_r0kh()
1156 wpa_printf(MSG_ERROR, "Invalid R0KH MAC address: '%s'", pos); in add_r0kh()
1161 pos = next; in add_r0kh()
1162 next = os_strchr(pos, ' '); in add_r0kh()
1165 if (next == NULL || next - pos > FT_R0KH_ID_MAX_LEN) { in add_r0kh()
1166 wpa_printf(MSG_ERROR, "Invalid R0KH-ID: '%s'", pos); in add_r0kh()
1170 r0kh->id_len = next - pos - 1; in add_r0kh()
1171 os_memcpy(r0kh->id, pos, r0kh->id_len); in add_r0kh()
1173 pos = next; in add_r0kh()
1174 if (rkh_derive_key(pos, r0kh->key, sizeof(r0kh->key)) < 0) { in add_r0kh()
1175 wpa_printf(MSG_ERROR, "Invalid R0KH key: '%s'", pos); in add_r0kh()
1190 char *pos, *next; in add_r1kh() local
1198 pos = value; in add_r1kh()
1199 next = os_strchr(pos, ' '); in add_r1kh()
1202 if (next == NULL || hwaddr_aton(pos, r1kh->addr)) { in add_r1kh()
1203 wpa_printf(MSG_ERROR, "Invalid R1KH MAC address: '%s'", pos); in add_r1kh()
1208 pos = next; in add_r1kh()
1209 next = os_strchr(pos, ' '); in add_r1kh()
1212 if (next == NULL || hwaddr_aton(pos, r1kh->id)) { in add_r1kh()
1213 wpa_printf(MSG_ERROR, "Invalid R1KH-ID: '%s'", pos); in add_r1kh()
1218 pos = next; in add_r1kh()
1219 if (rkh_derive_key(pos, r1kh->key, sizeof(r1kh->key)) < 0) { in add_r1kh()
1220 wpa_printf(MSG_ERROR, "Invalid R1KH key: '%s'", pos); in add_r1kh()
1407 static int parse_roaming_consortium(struct hostapd_bss_config *bss, char *pos, in parse_roaming_consortium() argument
1410 size_t len = os_strlen(pos); in parse_roaming_consortium()
1416 hexstr2bin(pos, oi, len / 2)) { in parse_roaming_consortium()
1418 "'%s'", line, pos); in parse_roaming_consortium()
1440 unsigned int *count, char *pos) in parse_lang_string() argument
1447 if (*pos == '"' || (*pos == 'P' && pos[1] == '"')) { in parse_lang_string()
1448 str = wpa_config_parse_string(pos, &slen); in parse_lang_string()
1451 pos = str; in parse_lang_string()
1454 sep = os_strchr(pos, ':'); in parse_lang_string()
1459 clen = os_strlen(pos); in parse_lang_string()
1476 os_memcpy(ls->lang, pos, clen); in parse_lang_string()
1487 static int parse_venue_name(struct hostapd_bss_config *bss, char *pos, in parse_venue_name() argument
1490 if (parse_lang_string(&bss->venue_name, &bss->venue_name_count, pos)) { in parse_venue_name()
1492 line, pos); in parse_venue_name()
1499 static int parse_venue_url(struct hostapd_bss_config *bss, char *pos, in parse_venue_url() argument
1507 sep = os_strchr(pos, ':'); in parse_venue_url()
1524 url->venue_number = atoi(pos); in parse_venue_url()
1532 line, pos); in parse_venue_url()
1541 char *pos; in parse_3gpp_cell_net() local
1547 for (pos = buf; *pos; pos++) { in parse_3gpp_cell_net()
1548 if ((*pos < '0' || *pos > '9') && *pos != ';' && *pos != ',') in parse_3gpp_cell_net()
1550 if (*pos == ';') in parse_3gpp_cell_net()
1568 pos = buf; in parse_3gpp_cell_net()
1569 while (pos && *pos) { in parse_3gpp_cell_net()
1573 mcc = pos; in parse_3gpp_cell_net()
1574 mnc = os_strchr(pos, ','); in parse_3gpp_cell_net()
1578 pos = os_strchr(mnc, ';'); in parse_3gpp_cell_net()
1579 if (pos) in parse_3gpp_cell_net()
1580 *pos++ = '\0'; in parse_3gpp_cell_net()
1617 char *pos, *end, *rpos; in parse_nai_realm() local
1657 pos = buf; in parse_nai_realm()
1658 realm->encoding = atoi(pos); in parse_nai_realm()
1659 pos = os_strchr(pos, ','); in parse_nai_realm()
1660 if (pos == NULL) in parse_nai_realm()
1662 pos++; in parse_nai_realm()
1664 end = os_strchr(pos, ','); in parse_nai_realm()
1666 len = end - pos; in parse_nai_realm()
1669 len = os_strlen(pos); in parse_nai_realm()
1677 os_memcpy(realm->realm_buf, pos, len); in parse_nai_realm()
1680 pos = end + 1; in parse_nai_realm()
1682 pos = NULL; in parse_nai_realm()
1684 while (pos && *pos) { in parse_nai_realm()
1695 end = os_strchr(pos, ','); in parse_nai_realm()
1697 end = pos + os_strlen(pos); in parse_nai_realm()
1699 eap->eap_method = atoi(pos); in parse_nai_realm()
1701 pos = os_strchr(pos, '['); in parse_nai_realm()
1702 if (pos == NULL || pos > end) in parse_nai_realm()
1704 pos++; in parse_nai_realm()
1709 eap->auth_id[eap->num_auths] = atoi(pos); in parse_nai_realm()
1710 pos = os_strchr(pos, ':'); in parse_nai_realm()
1711 if (pos == NULL || pos > end) in parse_nai_realm()
1713 pos++; in parse_nai_realm()
1714 eap->auth_val[eap->num_auths] = atoi(pos); in parse_nai_realm()
1715 pos = os_strchr(pos, ']'); in parse_nai_realm()
1716 if (pos == NULL || pos > end) in parse_nai_realm()
1718 pos++; in parse_nai_realm()
1725 pos = end + 1; in parse_nai_realm()
1805 char *pos = buf; in parse_qos_map_set() local
1815 val = atoi(pos); in parse_qos_map_set()
1823 pos = os_strchr(pos, ','); in parse_qos_map_set()
1824 if (!pos) in parse_qos_map_set()
1826 pos++; in parse_qos_map_set()
1849 char *pos; in hs20_parse_conn_capab() local
1861 pos = buf; in hs20_parse_conn_capab()
1862 conn_cap[0] = atoi(pos); in hs20_parse_conn_capab()
1863 pos = os_strchr(pos, ':'); in hs20_parse_conn_capab()
1864 if (pos == NULL) in hs20_parse_conn_capab()
1866 pos++; in hs20_parse_conn_capab()
1867 WPA_PUT_LE16(conn_cap + 1, atoi(pos)); in hs20_parse_conn_capab()
1868 pos = os_strchr(pos, ':'); in hs20_parse_conn_capab()
1869 if (pos == NULL) in hs20_parse_conn_capab()
1871 pos++; in hs20_parse_conn_capab()
1872 conn_cap[3] = atoi(pos); in hs20_parse_conn_capab()
1883 char *pos; in hs20_parse_wan_metrics() local
1891 pos = buf; in hs20_parse_wan_metrics()
1893 if (hexstr2bin(pos, wan_metrics, 1) < 0) in hs20_parse_wan_metrics()
1895 pos += 2; in hs20_parse_wan_metrics()
1896 if (*pos != ':') in hs20_parse_wan_metrics()
1898 pos++; in hs20_parse_wan_metrics()
1901 WPA_PUT_LE32(wan_metrics + 1, atoi(pos)); in hs20_parse_wan_metrics()
1902 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1903 if (pos == NULL) in hs20_parse_wan_metrics()
1905 pos++; in hs20_parse_wan_metrics()
1908 WPA_PUT_LE32(wan_metrics + 5, atoi(pos)); in hs20_parse_wan_metrics()
1909 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1910 if (pos == NULL) in hs20_parse_wan_metrics()
1912 pos++; in hs20_parse_wan_metrics()
1915 wan_metrics[9] = atoi(pos); in hs20_parse_wan_metrics()
1916 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1917 if (pos == NULL) in hs20_parse_wan_metrics()
1919 pos++; in hs20_parse_wan_metrics()
1922 wan_metrics[10] = atoi(pos); in hs20_parse_wan_metrics()
1923 pos = os_strchr(pos, ':'); in hs20_parse_wan_metrics()
1924 if (pos == NULL) in hs20_parse_wan_metrics()
1926 pos++; in hs20_parse_wan_metrics()
1929 WPA_PUT_LE16(wan_metrics + 11, atoi(pos)); in hs20_parse_wan_metrics()
1945 char *pos, int line) in hs20_parse_oper_friendly_name() argument
1948 &bss->hs20_oper_friendly_name_count, pos)) { in hs20_parse_oper_friendly_name()
1950 "hs20_oper_friendly_name '%s'", line, pos); in hs20_parse_oper_friendly_name()
1957 static int hs20_parse_icon(struct hostapd_bss_config *bss, char *pos) in hs20_parse_icon() argument
1970 icon->width = atoi(pos); in hs20_parse_icon()
1971 pos = os_strchr(pos, ':'); in hs20_parse_icon()
1972 if (pos == NULL) in hs20_parse_icon()
1974 pos++; in hs20_parse_icon()
1976 icon->height = atoi(pos); in hs20_parse_icon()
1977 pos = os_strchr(pos, ':'); in hs20_parse_icon()
1978 if (pos == NULL) in hs20_parse_icon()
1980 pos++; in hs20_parse_icon()
1982 end = os_strchr(pos, ':'); in hs20_parse_icon()
1983 if (end == NULL || end - pos > 3) in hs20_parse_icon()
1985 os_memcpy(icon->language, pos, end - pos); in hs20_parse_icon()
1986 pos = end + 1; in hs20_parse_icon()
1988 end = os_strchr(pos, ':'); in hs20_parse_icon()
1989 if (end == NULL || end - pos > 255) in hs20_parse_icon()
1991 os_memcpy(icon->type, pos, end - pos); in hs20_parse_icon()
1992 pos = end + 1; in hs20_parse_icon()
1994 end = os_strchr(pos, ':'); in hs20_parse_icon()
1995 if (end == NULL || end - pos > 255) in hs20_parse_icon()
1997 os_memcpy(icon->name, pos, end - pos); in hs20_parse_icon()
1998 pos = end + 1; in hs20_parse_icon()
2000 if (os_strlen(pos) > 255) in hs20_parse_icon()
2002 os_memcpy(icon->file, pos, os_strlen(pos)); in hs20_parse_icon()
2011 char *pos, int line) in hs20_parse_osu_ssid() argument
2016 str = wpa_config_parse_string(pos, &slen); in hs20_parse_osu_ssid()
2018 wpa_printf(MSG_ERROR, "Line %d: Invalid SSID '%s'", line, pos); in hs20_parse_osu_ssid()
2032 char *pos, int line) in hs20_parse_osu_server_uri() argument
2045 bss->last_osu->server_uri = os_strdup(pos); in hs20_parse_osu_server_uri()
2052 char *pos, int line) in hs20_parse_osu_friendly_name() argument
2060 &bss->last_osu->friendly_name_count, pos)) { in hs20_parse_osu_friendly_name()
2062 line, pos); in hs20_parse_osu_friendly_name()
2071 char *pos, int line) in hs20_parse_osu_nai() argument
2079 bss->last_osu->osu_nai = os_strdup(pos); in hs20_parse_osu_nai()
2088 char *pos, int line) in hs20_parse_osu_nai2() argument
2096 bss->last_osu->osu_nai2 = os_strdup(pos); in hs20_parse_osu_nai2()
2105 static int hs20_parse_osu_method_list(struct hostapd_bss_config *bss, char *pos, in hs20_parse_osu_method_list() argument
2113 if (hostapd_parse_intlist(&bss->last_osu->method_list, pos)) { in hs20_parse_osu_method_list()
2122 static int hs20_parse_osu_icon(struct hostapd_bss_config *bss, char *pos, in hs20_parse_osu_icon() argument
2137 p->icons[p->icons_count] = os_strdup(pos); in hs20_parse_osu_icon()
2147 char *pos, int line) in hs20_parse_osu_service_desc() argument
2155 &bss->last_osu->service_desc_count, pos)) { in hs20_parse_osu_service_desc()
2157 line, pos); in hs20_parse_osu_service_desc()
2165 static int hs20_parse_operator_icon(struct hostapd_bss_config *bss, char *pos, in hs20_parse_operator_icon() argument
2175 bss->hs20_operator_icon[bss->hs20_operator_icon_count] = os_strdup(pos); in hs20_parse_operator_icon()
2188 char *pos) in hostapd_config_parse_acs_chan_bias() argument
2194 while (*pos) { in hostapd_config_parse_acs_chan_bias()
2200 bias[num].channel = atoi(pos); in hostapd_config_parse_acs_chan_bias()
2203 pos = os_strchr(pos, ':'); in hostapd_config_parse_acs_chan_bias()
2204 if (!pos) in hostapd_config_parse_acs_chan_bias()
2206 pos++; in hostapd_config_parse_acs_chan_bias()
2207 bias[num].bias = strtod(pos, &end); in hostapd_config_parse_acs_chan_bias()
2208 if (end == pos || bias[num].bias < 0.0) in hostapd_config_parse_acs_chan_bias()
2210 pos = end; in hostapd_config_parse_acs_chan_bias()
2211 if (*pos != ' ' && *pos != '\0') in hostapd_config_parse_acs_chan_bias()
2320 const char *pos = val, *pos2, *end = NULL; in parse_sae_password() local
2327 pos2 = os_strstr(pos, "|mac="); in parse_sae_password()
2333 pos = pos2 + ETH_ALEN * 3 - 1; in parse_sae_password()
2336 pos2 = os_strstr(pos, "|vlanid="); in parse_sae_password()
2344 pos2 = os_strstr(pos, "|id="); in parse_sae_password()
2381 const char *buf, char *pos, int line) in hostapd_config_fill() argument
2384 os_strlcpy(conf->bss[0]->iface, pos, in hostapd_config_fill()
2387 os_strlcpy(bss->bridge, pos, sizeof(bss->bridge)); in hostapd_config_fill()
2389 os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge)); in hostapd_config_fill()
2391 os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge)); in hostapd_config_fill()
2397 if (os_strcmp(pos, wpa_drivers[j]->name) == 0) { in hostapd_config_fill()
2405 line, pos); in hostapd_config_fill()
2411 conf->driver_params = os_strdup(pos); in hostapd_config_fill()
2416 bss->logger_syslog_level = atoi(pos); in hostapd_config_fill()
2418 bss->logger_stdout_level = atoi(pos); in hostapd_config_fill()
2420 bss->logger_syslog = atoi(pos); in hostapd_config_fill()
2422 bss->logger_stdout = atoi(pos); in hostapd_config_fill()
2427 bss->ssid.ssid_len = os_strlen(pos); in hostapd_config_fill()
2431 line, pos); in hostapd_config_fill()
2434 os_memcpy(bss->ssid.ssid, pos, bss->ssid.ssid_len); in hostapd_config_fill()
2438 char *str = wpa_config_parse_string(pos, &slen); in hostapd_config_fill()
2441 line, pos); in hostapd_config_fill()
2450 bss->ssid.utf8_ssid = atoi(pos) > 0; in hostapd_config_fill()
2452 enum macaddr_acl acl = atoi(pos); in hostapd_config_fill()
2463 if (hostapd_config_read_maclist(pos, &bss->accept_mac, in hostapd_config_fill()
2466 line, pos); in hostapd_config_fill()
2470 if (hostapd_config_read_maclist(pos, &bss->deny_mac, in hostapd_config_fill()
2473 line, pos); in hostapd_config_fill()
2477 bss->wds_sta = atoi(pos); in hostapd_config_fill()
2479 bss->start_disabled = atoi(pos); in hostapd_config_fill()
2481 bss->isolate = atoi(pos); in hostapd_config_fill()
2483 bss->ap_max_inactivity = atoi(pos); in hostapd_config_fill()
2485 bss->skip_inactivity_poll = atoi(pos); in hostapd_config_fill()
2487 os_memcpy(conf->country, pos, 2); in hostapd_config_fill()
2489 conf->country[2] = strtol(pos, NULL, 16); in hostapd_config_fill()
2491 conf->ieee80211d = atoi(pos); in hostapd_config_fill()
2493 conf->ieee80211h = atoi(pos); in hostapd_config_fill()
2495 bss->ieee802_1x = atoi(pos); in hostapd_config_fill()
2497 int eapol_version = atoi(pos); in hostapd_config_fill()
2502 line, eapol_version, pos); in hostapd_config_fill()
2509 bss->eap_server = atoi(pos); in hostapd_config_fill()
2512 bss->eap_server = atoi(pos); in hostapd_config_fill()
2514 if (hostapd_config_read_eap_user(pos, bss)) in hostapd_config_fill()
2518 bss->ca_cert = os_strdup(pos); in hostapd_config_fill()
2521 bss->server_cert = os_strdup(pos); in hostapd_config_fill()
2524 bss->private_key = os_strdup(pos); in hostapd_config_fill()
2527 bss->private_key_passwd = os_strdup(pos); in hostapd_config_fill()
2529 if (!pos[0]) { in hostapd_config_fill()
2531 line, pos); in hostapd_config_fill()
2535 bss->check_cert_subject = os_strdup(pos); in hostapd_config_fill()
2539 bss->check_crl = atoi(pos); in hostapd_config_fill()
2541 bss->check_crl_strict = atoi(pos); in hostapd_config_fill()
2543 bss->crl_reload_interval = atoi(pos); in hostapd_config_fill()
2545 bss->tls_session_lifetime = atoi(pos); in hostapd_config_fill()
2547 bss->tls_flags = parse_tls_flags(pos); in hostapd_config_fill()
2550 bss->ocsp_stapling_response = os_strdup(pos); in hostapd_config_fill()
2553 bss->ocsp_stapling_response_multi = os_strdup(pos); in hostapd_config_fill()
2556 bss->dh_file = os_strdup(pos); in hostapd_config_fill()
2559 bss->openssl_ciphers = os_strdup(pos); in hostapd_config_fill()
2562 bss->openssl_ecdh_curves = os_strdup(pos); in hostapd_config_fill()
2564 bss->fragment_size = atoi(pos); in hostapd_config_fill()
2574 } else if (hexstr2bin(pos, bss->pac_opaque_encr_key, 16)) { in hostapd_config_fill()
2580 size_t idlen = os_strlen(pos); in hostapd_config_fill()
2589 hexstr2bin(pos, bss->eap_fast_a_id, idlen / 2)) { in hostapd_config_fill()
2600 bss->eap_fast_a_id_info = os_strdup(pos); in hostapd_config_fill()
2602 bss->eap_fast_prov = atoi(pos); in hostapd_config_fill()
2604 bss->pac_key_lifetime = atoi(pos); in hostapd_config_fill()
2606 bss->pac_key_refresh_time = atoi(pos); in hostapd_config_fill()
2611 bss->eap_sim_db = os_strdup(pos); in hostapd_config_fill()
2613 bss->eap_sim_db_timeout = atoi(pos); in hostapd_config_fill()
2615 bss->eap_sim_aka_result_ind = atoi(pos); in hostapd_config_fill()
2619 bss->tnc = atoi(pos); in hostapd_config_fill()
2623 bss->pwd_group = atoi(pos); in hostapd_config_fill()
2627 bss->eap_server_erp = atoi(pos); in hostapd_config_fill()
2633 bss->eap_req_id_text = os_strdup(pos); in hostapd_config_fill()
2649 bss->erp_send_reauth_start = atoi(pos); in hostapd_config_fill()
2652 bss->erp_domain = os_strdup(pos); in hostapd_config_fill()
2654 int val = atoi(pos); in hostapd_config_fill()
2664 int val = atoi(pos); in hostapd_config_fill()
2674 bss->wep_rekeying_period = atoi(pos); in hostapd_config_fill()
2681 bss->eap_reauth_period = atoi(pos); in hostapd_config_fill()
2688 bss->eapol_key_index_workaround = atoi(pos); in hostapd_config_fill()
2692 os_strlcpy(bss->iapp_iface, pos, sizeof(bss->iapp_iface)); in hostapd_config_fill()
2695 if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) { in hostapd_config_fill()
2698 line, pos); in hostapd_config_fill()
2703 bss->nas_identifier = os_strdup(pos); in hostapd_config_fill()
2706 if (hostapd_parse_ip_addr(pos, &bss->radius->client_addr)) { in hostapd_config_fill()
2709 line, pos); in hostapd_config_fill()
2716 &bss->radius->num_auth_servers, pos, 1812, in hostapd_config_fill()
2720 line, pos); in hostapd_config_fill()
2725 if (hostapd_parse_ip_addr(pos, in hostapd_config_fill()
2729 line, pos); in hostapd_config_fill()
2734 bss->radius->auth_server->port = atoi(pos); in hostapd_config_fill()
2737 int len = os_strlen(pos); in hostapd_config_fill()
2745 bss->radius->auth_server->shared_secret = (u8 *) os_strdup(pos); in hostapd_config_fill()
2750 &bss->radius->num_acct_servers, pos, 1813, in hostapd_config_fill()
2754 line, pos); in hostapd_config_fill()
2759 if (hostapd_parse_ip_addr(pos, in hostapd_config_fill()
2763 line, pos); in hostapd_config_fill()
2768 bss->radius->acct_server->port = atoi(pos); in hostapd_config_fill()
2771 int len = os_strlen(pos); in hostapd_config_fill()
2779 bss->radius->acct_server->shared_secret = (u8 *) os_strdup(pos); in hostapd_config_fill()
2782 bss->radius->retry_primary_interval = atoi(pos); in hostapd_config_fill()
2784 bss->acct_interim_interval = atoi(pos); in hostapd_config_fill()
2786 bss->radius_request_cui = atoi(pos); in hostapd_config_fill()
2789 attr = hostapd_parse_radius_attr(pos); in hostapd_config_fill()
2805 attr = hostapd_parse_radius_attr(pos); in hostapd_config_fill()
2820 bss->radius_das_port = atoi(pos); in hostapd_config_fill()
2822 if (hostapd_parse_das_client(bss, pos) < 0) { in hostapd_config_fill()
2828 bss->radius_das_time_window = atoi(pos); in hostapd_config_fill()
2830 bss->radius_das_require_event_timestamp = atoi(pos); in hostapd_config_fill()
2833 bss->radius_das_require_message_authenticator = atoi(pos); in hostapd_config_fill()
2836 bss->auth_algs = atoi(pos); in hostapd_config_fill()
2843 bss->max_num_sta = atoi(pos); in hostapd_config_fill()
2851 bss->wpa = atoi(pos); in hostapd_config_fill()
2853 bss->wpa_group_rekey = atoi(pos); in hostapd_config_fill()
2856 bss->wpa_strict_rekey = atoi(pos); in hostapd_config_fill()
2858 bss->wpa_gmk_rekey = atoi(pos); in hostapd_config_fill()
2860 bss->wpa_ptk_rekey = atoi(pos); in hostapd_config_fill()
2863 unsigned long val = strtoul(pos, &endp, 0); in hostapd_config_fill()
2874 unsigned long val = strtoul(pos, &endp, 0); in hostapd_config_fill()
2884 bss->wpa_disable_eapol_key_retries = atoi(pos); in hostapd_config_fill()
2886 int len = os_strlen(pos); in hostapd_config_fill()
2893 bss->ssid.wpa_passphrase = os_strdup(pos); in hostapd_config_fill()
2903 if (hexstr2bin(pos, bss->ssid.wpa_psk->psk, PMK_LEN) || in hostapd_config_fill()
2904 pos[PMK_LEN * 2] != '\0') { in hostapd_config_fill()
2906 line, pos); in hostapd_config_fill()
2916 bss->ssid.wpa_psk_file = os_strdup(pos); in hostapd_config_fill()
2923 bss->wpa_key_mgmt = hostapd_config_parse_key_mgmt(line, pos); in hostapd_config_fill()
2927 bss->wpa_psk_radius = atoi(pos); in hostapd_config_fill()
2937 bss->wpa_pairwise = hostapd_config_parse_cipher(line, pos); in hostapd_config_fill()
2943 line, pos); in hostapd_config_fill()
2947 bss->rsn_pairwise = hostapd_config_parse_cipher(line, pos); in hostapd_config_fill()
2953 line, pos); in hostapd_config_fill()
2957 bss->group_cipher = hostapd_config_parse_cipher(line, pos); in hostapd_config_fill()
2967 line, pos); in hostapd_config_fill()
2972 bss->rsn_preauth = atoi(pos); in hostapd_config_fill()
2975 bss->rsn_preauth_interfaces = os_strdup(pos); in hostapd_config_fill()
2982 if (os_strlen(pos) != 2 * MOBILITY_DOMAIN_ID_LEN || in hostapd_config_fill()
2983 hexstr2bin(pos, bss->mobility_domain, in hostapd_config_fill()
2987 line, pos); in hostapd_config_fill()
2991 if (os_strlen(pos) != 2 * FT_R1KH_ID_LEN || in hostapd_config_fill()
2992 hexstr2bin(pos, bss->r1_key_holder, FT_R1KH_ID_LEN) != 0) { in hostapd_config_fill()
2995 line, pos); in hostapd_config_fill()
3000 bss->r0_key_lifetime = atoi(pos) * 60; in hostapd_config_fill()
3002 bss->r0_key_lifetime = atoi(pos); in hostapd_config_fill()
3004 bss->r1_max_key_lifetime = atoi(pos); in hostapd_config_fill()
3006 bss->reassociation_deadline = atoi(pos); in hostapd_config_fill()
3008 bss->rkh_pos_timeout = atoi(pos); in hostapd_config_fill()
3010 bss->rkh_neg_timeout = atoi(pos); in hostapd_config_fill()
3012 bss->rkh_pull_timeout = atoi(pos); in hostapd_config_fill()
3014 bss->rkh_pull_retries = atoi(pos); in hostapd_config_fill()
3016 if (add_r0kh(bss, pos) < 0) { in hostapd_config_fill()
3018 line, pos); in hostapd_config_fill()
3022 if (add_r1kh(bss, pos) < 0) { in hostapd_config_fill()
3024 line, pos); in hostapd_config_fill()
3028 bss->pmk_r1_push = atoi(pos); in hostapd_config_fill()
3030 bss->ft_over_ds = atoi(pos); in hostapd_config_fill()
3032 bss->ft_psk_generate_local = atoi(pos); in hostapd_config_fill()
3037 bss->ctrl_interface = os_strdup(pos); in hostapd_config_fill()
3042 const char *group = pos; in hostapd_config_fill()
3068 bss->radius_server_clients = os_strdup(pos); in hostapd_config_fill()
3070 bss->radius_server_auth_port = atoi(pos); in hostapd_config_fill()
3072 bss->radius_server_acct_port = atoi(pos); in hostapd_config_fill()
3074 bss->radius_server_ipv6 = atoi(pos); in hostapd_config_fill()
3077 bss->use_pae_group_addr = atoi(pos); in hostapd_config_fill()
3079 if (os_strcmp(pos, "a") == 0) in hostapd_config_fill()
3081 else if (os_strcmp(pos, "b") == 0) in hostapd_config_fill()
3083 else if (os_strcmp(pos, "g") == 0) in hostapd_config_fill()
3085 else if (os_strcmp(pos, "ad") == 0) in hostapd_config_fill()
3087 else if (os_strcmp(pos, "any") == 0) in hostapd_config_fill()
3091 line, pos); in hostapd_config_fill()
3095 if (os_strcmp(pos, "ad") == 0) in hostapd_config_fill()
3097 else if (os_strcmp(pos, "a") == 0) in hostapd_config_fill()
3099 else if (os_strcmp(pos, "g") == 0 || in hostapd_config_fill()
3100 os_strcmp(pos, "b") == 0) in hostapd_config_fill()
3102 else if (os_strcmp(pos, "ag") == 0 || in hostapd_config_fill()
3103 os_strcmp(pos, "ga") == 0) in hostapd_config_fill()
3108 line, pos); in hostapd_config_fill()
3112 conf->acs_exclude_dfs = atoi(pos); in hostapd_config_fill()
3114 if (os_strcmp(pos, "acs_survey") == 0) { in hostapd_config_fill()
3124 conf->channel = atoi(pos); in hostapd_config_fill()
3128 if (hostapd_parse_chanlist(conf, pos)) { in hostapd_config_fill()
3134 int val = atoi(pos); in hostapd_config_fill()
3149 int val = atoi(pos); in hostapd_config_fill()
3157 if (hostapd_config_parse_acs_chan_bias(conf, pos)) { in hostapd_config_fill()
3164 int val = atoi(pos); in hostapd_config_fill()
3173 int val = atoi(pos); in hostapd_config_fill()
3183 int val = atoi(pos); in hostapd_config_fill()
3193 conf->rts_threshold = atoi(pos); in hostapd_config_fill()
3201 conf->fragm_threshold = atoi(pos); in hostapd_config_fill()
3212 int val = atoi(pos); in hostapd_config_fill()
3220 if (hostapd_parse_intlist(&conf->supported_rates, pos)) { in hostapd_config_fill()
3226 if (hostapd_parse_intlist(&conf->basic_rates, pos)) { in hostapd_config_fill()
3234 if (os_strncmp(pos, "ht:", 3) == 0) { in hostapd_config_fill()
3235 val = atoi(pos + 3); in hostapd_config_fill()
3244 } else if (os_strncmp(pos, "vht:", 4) == 0) { in hostapd_config_fill()
3245 val = atoi(pos + 4); in hostapd_config_fill()
3255 val = atoi(pos); in hostapd_config_fill()
3266 if (atoi(pos)) in hostapd_config_fill()
3271 bss->ignore_broadcast_ssid = atoi(pos); in hostapd_config_fill()
3273 bss->no_probe_resp_if_max_sta = atoi(pos); in hostapd_config_fill()
3275 bss->ssid.wep.idx = atoi(pos); in hostapd_config_fill()
3287 buf[7] - '0', pos)) { in hostapd_config_fill()
3294 bss->ssid.dynamic_vlan = atoi(pos); in hostapd_config_fill()
3296 bss->ssid.per_sta_vif = atoi(pos); in hostapd_config_fill()
3298 if (hostapd_config_read_vlan_file(bss, pos)) { in hostapd_config_fill()
3300 line, pos); in hostapd_config_fill()
3304 bss->ssid.vlan_naming = atoi(pos); in hostapd_config_fill()
3315 bss->ssid.vlan_tagged_interface = os_strdup(pos); in hostapd_config_fill()
3319 conf->ap_table_max_size = atoi(pos); in hostapd_config_fill()
3321 conf->ap_table_expiration_time = atoi(pos); in hostapd_config_fill()
3323 if (hostapd_config_tx_queue(conf, buf, pos)) { in hostapd_config_fill()
3330 bss->wmm_enabled = atoi(pos); in hostapd_config_fill()
3332 bss->wmm_uapsd = atoi(pos); in hostapd_config_fill()
3335 if (hostapd_config_wmm_ac(conf->wmm_ac_params, buf, pos)) { in hostapd_config_fill()
3341 if (hostapd_config_bss(conf, pos)) { in hostapd_config_fill()
3347 if (hwaddr_aton(pos, bss->bssid)) { in hostapd_config_fill()
3353 conf->use_driver_iface_addr = atoi(pos); in hostapd_config_fill()
3356 bss->ieee80211w = atoi(pos); in hostapd_config_fill()
3358 if (os_strcmp(pos, "AES-128-CMAC") == 0) { in hostapd_config_fill()
3360 } else if (os_strcmp(pos, "BIP-GMAC-128") == 0) { in hostapd_config_fill()
3362 } else if (os_strcmp(pos, "BIP-GMAC-256") == 0) { in hostapd_config_fill()
3364 } else if (os_strcmp(pos, "BIP-CMAC-256") == 0) { in hostapd_config_fill()
3368 line, pos); in hostapd_config_fill()
3372 bss->assoc_sa_query_max_timeout = atoi(pos); in hostapd_config_fill()
3379 bss->assoc_sa_query_retry_timeout = atoi(pos); in hostapd_config_fill()
3388 bss->ocv = atoi(pos); in hostapd_config_fill()
3394 conf->ieee80211n = atoi(pos); in hostapd_config_fill()
3396 if (hostapd_config_ht_capab(conf, pos) < 0) { in hostapd_config_fill()
3402 conf->require_ht = atoi(pos); in hostapd_config_fill()
3404 conf->obss_interval = atoi(pos); in hostapd_config_fill()
3408 conf->ieee80211ac = atoi(pos); in hostapd_config_fill()
3410 if (hostapd_config_vht_capab(conf, pos) < 0) { in hostapd_config_fill()
3416 conf->require_vht = atoi(pos); in hostapd_config_fill()
3418 conf->vht_oper_chwidth = atoi(pos); in hostapd_config_fill()
3420 conf->vht_oper_centr_freq_seg0_idx = atoi(pos); in hostapd_config_fill()
3422 conf->vht_oper_centr_freq_seg1_idx = atoi(pos); in hostapd_config_fill()
3424 bss->vendor_vht = atoi(pos); in hostapd_config_fill()
3426 bss->use_sta_nsts = atoi(pos); in hostapd_config_fill()
3430 conf->ieee80211ax = atoi(pos); in hostapd_config_fill()
3432 conf->he_phy_capab.he_su_beamformer = atoi(pos); in hostapd_config_fill()
3434 conf->he_phy_capab.he_su_beamformee = atoi(pos); in hostapd_config_fill()
3436 conf->he_phy_capab.he_mu_beamformer = atoi(pos); in hostapd_config_fill()
3438 conf->he_op.he_bss_color = atoi(pos); in hostapd_config_fill()
3440 conf->he_op.he_default_pe_duration = atoi(pos); in hostapd_config_fill()
3442 conf->he_op.he_twt_required = atoi(pos); in hostapd_config_fill()
3444 conf->he_op.he_rts_threshold = atoi(pos); in hostapd_config_fill()
3447 set_he_cap(atoi(pos), HE_QOS_INFO_EDCA_PARAM_SET_COUNT); in hostapd_config_fill()
3450 set_he_cap(atoi(pos), HE_QOS_INFO_Q_ACK); in hostapd_config_fill()
3453 set_he_cap(atoi(pos), HE_QOS_INFO_QUEUE_REQUEST); in hostapd_config_fill()
3456 set_he_cap(atoi(pos), HE_QOS_INFO_TXOP_REQUEST); in hostapd_config_fill()
3459 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3462 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3465 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3468 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3471 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3474 atoi(pos) & 0xff; in hostapd_config_fill()
3477 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3480 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3483 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3486 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3489 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3492 atoi(pos) & 0xff; in hostapd_config_fill()
3495 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3498 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3501 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3504 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3507 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3510 atoi(pos) & 0xff; in hostapd_config_fill()
3513 set_he_cap(atoi(pos), HE_MU_AC_PARAM_AIFSN); in hostapd_config_fill()
3516 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACM); in hostapd_config_fill()
3519 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ACI); in hostapd_config_fill()
3522 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMIN); in hostapd_config_fill()
3525 set_he_cap(atoi(pos), HE_MU_AC_PARAM_ECWMAX); in hostapd_config_fill()
3528 atoi(pos) & 0xff; in hostapd_config_fill()
3531 bss->max_listen_interval = atoi(pos); in hostapd_config_fill()
3533 bss->disable_pmksa_caching = atoi(pos); in hostapd_config_fill()
3535 bss->okc = atoi(pos); in hostapd_config_fill()
3538 bss->wps_state = atoi(pos); in hostapd_config_fill()
3545 bss->wps_independent = atoi(pos); in hostapd_config_fill()
3547 bss->ap_setup_locked = atoi(pos); in hostapd_config_fill()
3549 if (uuid_str2bin(pos, bss->uuid)) { in hostapd_config_fill()
3555 bss->wps_pin_requests = os_strdup(pos); in hostapd_config_fill()
3557 if (os_strlen(pos) > WPS_DEV_NAME_MAX_LEN) { in hostapd_config_fill()
3563 bss->device_name = os_strdup(pos); in hostapd_config_fill()
3565 if (os_strlen(pos) > 64) { in hostapd_config_fill()
3571 bss->manufacturer = os_strdup(pos); in hostapd_config_fill()
3573 if (os_strlen(pos) > 32) { in hostapd_config_fill()
3579 bss->model_name = os_strdup(pos); in hostapd_config_fill()
3581 if (os_strlen(pos) > 32) { in hostapd_config_fill()
3587 bss->model_number = os_strdup(pos); in hostapd_config_fill()
3589 if (os_strlen(pos) > 32) { in hostapd_config_fill()
3595 bss->serial_number = os_strdup(pos); in hostapd_config_fill()
3597 if (wps_dev_type_str2bin(pos, bss->device_type)) in hostapd_config_fill()
3601 bss->config_methods = os_strdup(pos); in hostapd_config_fill()
3603 if (hexstr2bin(pos, bss->os_version, 4)) { in hostapd_config_fill()
3610 if (*pos == '\0') in hostapd_config_fill()
3613 bss->ap_pin = os_strdup(pos); in hostapd_config_fill()
3615 bss->skip_cred_build = atoi(pos); in hostapd_config_fill()
3618 bss->extra_cred = (u8 *) os_readfile(pos, &bss->extra_cred_len); in hostapd_config_fill()
3621 line, pos); in hostapd_config_fill()
3625 bss->wps_cred_processing = atoi(pos); in hostapd_config_fill()
3627 bss->wps_cred_add_sae = atoi(pos); in hostapd_config_fill()
3631 (u8 *) os_readfile(pos, &bss->ap_settings_len); in hostapd_config_fill()
3634 line, pos); in hostapd_config_fill()
3639 char *str = wpa_config_parse_string(pos, &slen); in hostapd_config_fill()
3643 line, pos); in hostapd_config_fill()
3652 int len = os_strlen(pos); in hostapd_config_fill()
3661 bss->multi_ap_backhaul_ssid.wpa_passphrase = os_strdup(pos); in hostapd_config_fill()
3674 if (hexstr2bin(pos, bss->multi_ap_backhaul_ssid.wpa_psk->psk, in hostapd_config_fill()
3676 pos[PMK_LEN * 2] != '\0') { in hostapd_config_fill()
3678 line, pos); in hostapd_config_fill()
3689 bss->upnp_iface = os_strdup(pos); in hostapd_config_fill()
3692 bss->friendly_name = os_strdup(pos); in hostapd_config_fill()
3695 bss->manufacturer_url = os_strdup(pos); in hostapd_config_fill()
3698 bss->model_description = os_strdup(pos); in hostapd_config_fill()
3701 bss->model_url = os_strdup(pos); in hostapd_config_fill()
3704 bss->upc = os_strdup(pos); in hostapd_config_fill()
3706 bss->pbc_in_m1 = atoi(pos); in hostapd_config_fill()
3709 bss->server_id = os_strdup(pos); in hostapd_config_fill()
3712 bss->wps_nfc_dev_pw_id = atoi(pos); in hostapd_config_fill()
3722 bss->wps_nfc_dh_pubkey = wpabuf_parse_bin(pos); in hostapd_config_fill()
3726 bss->wps_nfc_dh_privkey = wpabuf_parse_bin(pos); in hostapd_config_fill()
3730 bss->wps_nfc_dev_pw = wpabuf_parse_bin(pos); in hostapd_config_fill()
3736 if (atoi(pos)) in hostapd_config_fill()
3741 if (atoi(pos)) in hostapd_config_fill()
3747 bss->disassoc_low_ack = atoi(pos); in hostapd_config_fill()
3749 if (atoi(pos)) in hostapd_config_fill()
3754 if (atoi(pos)) in hostapd_config_fill()
3761 rsn_testing = atoi(pos); in hostapd_config_fill()
3764 bss->time_advertisement = atoi(pos); in hostapd_config_fill()
3766 size_t tz_len = os_strlen(pos); in hostapd_config_fill()
3773 bss->time_zone = os_strdup(pos); in hostapd_config_fill()
3778 bss->wnm_sleep_mode = atoi(pos); in hostapd_config_fill()
3780 bss->wnm_sleep_mode_no_keys = atoi(pos); in hostapd_config_fill()
3782 bss->bss_transition = atoi(pos); in hostapd_config_fill()
3786 bss->interworking = atoi(pos); in hostapd_config_fill()
3788 bss->access_network_type = atoi(pos); in hostapd_config_fill()
3797 bss->internet = atoi(pos); in hostapd_config_fill()
3799 bss->asra = atoi(pos); in hostapd_config_fill()
3801 bss->esr = atoi(pos); in hostapd_config_fill()
3803 bss->uesa = atoi(pos); in hostapd_config_fill()
3805 bss->venue_group = atoi(pos); in hostapd_config_fill()
3808 bss->venue_type = atoi(pos); in hostapd_config_fill()
3811 if (hwaddr_aton(pos, bss->hessid)) { in hostapd_config_fill()
3816 if (parse_roaming_consortium(bss, pos, line) < 0) in hostapd_config_fill()
3819 if (parse_venue_name(bss, pos, line) < 0) in hostapd_config_fill()
3822 if (parse_venue_url(bss, pos, line) < 0) in hostapd_config_fill()
3827 if (hexstr2bin(pos, &auth_type, 1)) { in hostapd_config_fill()
3830 line, pos); in hostapd_config_fill()
3834 redirect_url_len = os_strlen(pos + 2); in hostapd_config_fill()
3844 os_memcpy(bss->network_auth_type + 3, pos + 2, in hostapd_config_fill()
3848 if (hexstr2bin(pos, &bss->ipaddr_type_availability, 1)) { in hostapd_config_fill()
3850 line, pos); in hostapd_config_fill()
3860 domain_list_len = os_strlen(pos) + 1; in hostapd_config_fill()
3866 tok_prev = pos; in hostapd_config_fill()
3872 tok_prev = pos; in hostapd_config_fill()
3893 if (parse_3gpp_cell_net(bss, pos, line) < 0) in hostapd_config_fill()
3896 if (parse_nai_realm(bss, pos, line) < 0) in hostapd_config_fill()
3899 if (parse_anqp_elem(bss, pos, line) < 0) in hostapd_config_fill()
3902 int val = atoi(pos); in hostapd_config_fill()
3907 line, pos); in hostapd_config_fill()
3912 bss->gas_comeback_delay = atoi(pos); in hostapd_config_fill()
3914 if (parse_qos_map_set(bss, pos, line) < 0) in hostapd_config_fill()
3920 bss->dump_msk_file = os_strdup(pos); in hostapd_config_fill()
3924 bss->proxy_arp = atoi(pos); in hostapd_config_fill()
3928 bss->hs20 = atoi(pos); in hostapd_config_fill()
3930 int val = atoi(pos); in hostapd_config_fill()
3935 line, pos); in hostapd_config_fill()
3940 bss->disable_dgaf = atoi(pos); in hostapd_config_fill()
3942 bss->na_mcast_to_ucast = atoi(pos); in hostapd_config_fill()
3944 bss->osen = atoi(pos); in hostapd_config_fill()
3946 bss->anqp_domain_id = atoi(pos); in hostapd_config_fill()
3948 bss->hs20_deauth_req_timeout = atoi(pos); in hostapd_config_fill()
3950 if (hs20_parse_oper_friendly_name(bss, pos, line) < 0) in hostapd_config_fill()
3953 if (hs20_parse_wan_metrics(bss, pos, line) < 0) in hostapd_config_fill()
3956 if (hs20_parse_conn_capab(bss, pos, line) < 0) { in hostapd_config_fill()
3962 oper_class_len = os_strlen(pos); in hostapd_config_fill()
3966 line, pos); in hostapd_config_fill()
3973 if (hexstr2bin(pos, oper_class, oper_class_len)) { in hostapd_config_fill()
3976 line, pos); in hostapd_config_fill()
3984 if (hs20_parse_icon(bss, pos) < 0) { in hostapd_config_fill()
3986 line, pos); in hostapd_config_fill()
3990 if (hs20_parse_osu_ssid(bss, pos, line) < 0) in hostapd_config_fill()
3993 if (hs20_parse_osu_server_uri(bss, pos, line) < 0) in hostapd_config_fill()
3996 if (hs20_parse_osu_friendly_name(bss, pos, line) < 0) in hostapd_config_fill()
3999 if (hs20_parse_osu_nai(bss, pos, line) < 0) in hostapd_config_fill()
4002 if (hs20_parse_osu_nai2(bss, pos, line) < 0) in hostapd_config_fill()
4005 if (hs20_parse_osu_method_list(bss, pos, line) < 0) in hostapd_config_fill()
4008 if (hs20_parse_osu_icon(bss, pos, line) < 0) in hostapd_config_fill()
4011 if (hs20_parse_osu_service_desc(bss, pos, line) < 0) in hostapd_config_fill()
4014 if (hs20_parse_operator_icon(bss, pos, line) < 0) in hostapd_config_fill()
4018 bss->subscr_remediation_url = os_strdup(pos); in hostapd_config_fill()
4020 bss->subscr_remediation_method = atoi(pos); in hostapd_config_fill()
4023 bss->t_c_filename = os_strdup(pos); in hostapd_config_fill()
4025 bss->t_c_timestamp = strtol(pos, NULL, 0); in hostapd_config_fill()
4028 bss->t_c_server_url = os_strdup(pos); in hostapd_config_fill()
4031 bss->hs20_sim_provisioning_url = os_strdup(pos); in hostapd_config_fill()
4035 bss->mbo_enabled = atoi(pos); in hostapd_config_fill()
4037 bss->mbo_cell_data_conn_pref = atoi(pos); in hostapd_config_fill()
4039 bss->oce = atoi(pos); in hostapd_config_fill()
4046 conf->_val = strtod(pos, &end); \ in hostapd_config_fill()
4051 line, pos); \ in hostapd_config_fill()
4060 conf->ecsa_ie_only = atoi(pos); in hostapd_config_fill()
4062 WPA_PUT_LE16(bss->bss_load_test, atoi(pos)); in hostapd_config_fill()
4063 pos = os_strchr(pos, ':'); in hostapd_config_fill()
4064 if (pos == NULL) { in hostapd_config_fill()
4069 pos++; in hostapd_config_fill()
4070 bss->bss_load_test[2] = atoi(pos); in hostapd_config_fill()
4071 pos = os_strchr(pos, ':'); in hostapd_config_fill()
4072 if (pos == NULL) { in hostapd_config_fill()
4077 pos++; in hostapd_config_fill()
4078 WPA_PUT_LE16(&bss->bss_load_test[3], atoi(pos)); in hostapd_config_fill()
4085 int val = atoi(pos); in hostapd_config_fill()
4092 size_t len = os_strlen(pos) / 2; in hostapd_config_fill()
4098 if (hexstr2bin(pos, wpabuf_put(tmp, len), len)) { in hostapd_config_fill()
4102 line, pos); in hostapd_config_fill()
4109 bss->sae_reflection_attack = atoi(pos); in hostapd_config_fill()
4112 bss->sae_commit_override = wpabuf_parse_bin(pos); in hostapd_config_fill()
4116 if (parse_sae_password(bss, pos) < 0) { in hostapd_config_fill()
4123 if (parse_wpabuf_hex(line, buf, &bss->vendor_elements, pos)) in hostapd_config_fill()
4126 if (parse_wpabuf_hex(line, buf, &bss->assocresp_elements, pos)) in hostapd_config_fill()
4129 bss->sae_anti_clogging_threshold = atoi(pos); in hostapd_config_fill()
4131 bss->sae_sync = atoi(pos); in hostapd_config_fill()
4133 if (hostapd_parse_intlist(&bss->sae_groups, pos)) { in hostapd_config_fill()
4136 line, pos); in hostapd_config_fill()
4140 bss->sae_require_mfp = atoi(pos); in hostapd_config_fill()
4142 int val = atoi(pos); in hostapd_config_fill()
4150 conf->spectrum_mgmt_required = atoi(pos); in hostapd_config_fill()
4153 bss->wowlan_triggers = os_strdup(pos); in hostapd_config_fill()
4156 size_t len = os_strlen(pos); in hostapd_config_fill()
4161 line, pos); in hostapd_config_fill()
4168 line, pos); in hostapd_config_fill()
4172 os_strlcpy(conf->fst_cfg.group_id, pos, in hostapd_config_fill()
4178 if (!*pos) { in hostapd_config_fill()
4185 val = strtol(pos, &endp, 0); in hostapd_config_fill()
4189 line, val, pos, FST_MAX_PRIO_VALUE); in hostapd_config_fill()
4197 if (!*pos) { in hostapd_config_fill()
4203 val = strtol(pos, &endp, 0); in hostapd_config_fill()
4208 line, val, pos, FST_MAX_LLT_MS); in hostapd_config_fill()
4214 conf->track_sta_max_num = atoi(pos); in hostapd_config_fill()
4216 conf->track_sta_max_age = atoi(pos); in hostapd_config_fill()
4219 bss->no_probe_resp_if_seen_on = os_strdup(pos); in hostapd_config_fill()
4222 bss->no_auth_if_seen_on = os_strdup(pos); in hostapd_config_fill()
4225 conf->lci = wpabuf_parse_bin(pos); in hostapd_config_fill()
4232 conf->civic = wpabuf_parse_bin(pos); in hostapd_config_fill()
4238 if (atoi(pos)) in hostapd_config_fill()
4242 if (atoi(pos)) in hostapd_config_fill()
4248 bss->gas_address3 = atoi(pos); in hostapd_config_fill()
4250 conf->stationary_ap = atoi(pos); in hostapd_config_fill()
4252 bss->ftm_responder = atoi(pos); in hostapd_config_fill()
4254 bss->ftm_initiator = atoi(pos); in hostapd_config_fill()
4257 if (hexstr2bin(pos, bss->fils_cache_id, FILS_CACHE_ID_LEN)) { in hostapd_config_fill()
4260 line, pos); in hostapd_config_fill()
4265 if (parse_fils_realm(bss, pos) < 0) in hostapd_config_fill()
4268 bss->fils_dh_group = atoi(pos); in hostapd_config_fill()
4270 if (hostapd_parse_ip_addr(pos, &bss->dhcp_server)) { in hostapd_config_fill()
4273 line, pos); in hostapd_config_fill()
4277 bss->dhcp_rapid_commit_proxy = atoi(pos); in hostapd_config_fill()
4279 bss->fils_hlp_wait_time = atoi(pos); in hostapd_config_fill()
4281 bss->dhcp_server_port = atoi(pos); in hostapd_config_fill()
4283 bss->dhcp_relay_port = atoi(pos); in hostapd_config_fill()
4286 bss->multicast_to_unicast = atoi(pos); in hostapd_config_fill()
4288 bss->broadcast_deauth = atoi(pos); in hostapd_config_fill()
4292 bss->dpp_connector = os_strdup(pos); in hostapd_config_fill()
4294 if (parse_wpabuf_hex(line, buf, &bss->dpp_netaccesskey, pos)) in hostapd_config_fill()
4297 bss->dpp_netaccesskey_expiry = strtol(pos, NULL, 0); in hostapd_config_fill()
4299 if (parse_wpabuf_hex(line, buf, &bss->dpp_csign, pos)) in hostapd_config_fill()
4304 if (hwaddr_aton(pos, bss->owe_transition_bssid)) { in hostapd_config_fill()
4312 char *str = wpa_config_parse_string(pos, &slen); in hostapd_config_fill()
4316 line, pos); in hostapd_config_fill()
4324 os_strlcpy(bss->owe_transition_ifname, pos, in hostapd_config_fill()
4327 if (hostapd_parse_intlist(&bss->owe_groups, pos)) { in hostapd_config_fill()
4330 line, pos); in hostapd_config_fill()
4334 bss->coloc_intf_reporting = atoi(pos); in hostapd_config_fill()
4337 int val = atoi(pos); in hostapd_config_fill()
4347 conf->rssi_reject_assoc_rssi = atoi(pos); in hostapd_config_fill()
4349 conf->rssi_reject_assoc_timeout = atoi(pos); in hostapd_config_fill()
4351 bss->pbss = atoi(pos); in hostapd_config_fill()
4372 char buf[4096], *pos; in hostapd_config_read() local
4409 pos = buf; in hostapd_config_read()
4410 while (*pos != '\0') { in hostapd_config_read()
4411 if (*pos == '\n') { in hostapd_config_read()
4412 *pos = '\0'; in hostapd_config_read()
4415 pos++; in hostapd_config_read()
4420 pos = os_strchr(buf, '='); in hostapd_config_read()
4421 if (pos == NULL) { in hostapd_config_read()
4427 *pos = '\0'; in hostapd_config_read()
4428 pos++; in hostapd_config_read()
4429 errors += hostapd_config_fill(conf, bss, buf, pos, line); in hostapd_config_read()