Home | History | Annotate | Download | only in ap

Lines Matching refs:conf

77 	radius_client_reconfig(hapd->radius, hapd->conf->radius);
80 ssid = &hapd->conf->ssid;
87 hostapd_config_clear_wpa_psk(&hapd->conf->ssid.wpa_psk);
89 if (hostapd_setup_wpa_psk(hapd->conf)) {
94 if (hapd->conf->ieee802_1x || hapd->conf->wpa)
95 hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 1);
97 hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0);
99 if ((hapd->conf->wpa || hapd->conf->osen) && hapd->wpa_auth == NULL) {
103 } else if (hapd->conf->wpa) {
115 hostapd_setup_encryption(hapd->conf->iface, hapd);
122 if (hapd->conf->ssid.ssid_set &&
123 hostapd_set_ssid(hapd, hapd->conf->ssid.ssid,
124 hapd->conf->ssid.ssid_len)) {
128 wpa_printf(MSG_DEBUG, "Reconfigured interface %s", hapd->conf->iface);
178 iface->conf = newconf;
195 hapd->conf = newconf->bss[j];
220 if (hapd->conf->ieee80211w) {
237 hostapd_broadcast_key_clear_iface(hapd, hapd->conf->iface);
245 struct hostapd_ssid *ssid = &hapd->conf->ssid;
249 hostapd_drv_set_key(hapd->conf->iface,
276 __func__, hapd->conf->iface);
281 wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
301 if (hostapd_if_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface)) {
304 hapd->conf->iface);
352 hapd->conf->iface);
408 hostapd_config_free(iface->conf);
409 iface->conf = NULL;
433 if (hapd->conf->ssid.wep.default_len) {
442 hostapd_drv_set_authmode(hapd, hapd->conf->auth_algs);
445 if (hapd->conf->ssid.wep.key[i] &&
447 i == hapd->conf->ssid.wep.idx, NULL, 0,
448 hapd->conf->ssid.wep.key[i],
449 hapd->conf->ssid.wep.len[i])) {
454 if (hapd->conf->ssid.wep.key[i] &&
455 i == hapd->conf->ssid.wep.idx)
509 unsigned int i = iface->conf->num_bss, bits = 0, j;
515 if (iface->conf->use_driver_iface_addr)
526 for (j = 0; j < iface->conf->num_bss; j++) {
527 if (is_zero_ether_addr(iface->conf->bss[j]->bssid)) {
535 iface->conf->bss[j]->bssid[i] ^
574 (unsigned long) iface->conf->num_bss, MAC2STR(mask), bits);
595 static int mac_in_conf(struct hostapd_config *conf, const void *a)
599 for (i = 0; i < conf->num_bss; i++) {
600 if (hostapd_mac_comp(conf->bss[i]->bssid, a) == 0) {
615 (!hapd->conf->nas_identifier ||
616 os_strlen(hapd->conf->nas_identifier) !=
618 os_memcmp(hapd->conf->nas_identifier, attr->nas_identifier,
625 (hapd->conf->own_ip_addr.af != AF_INET ||
626 os_memcmp(&hapd->conf->own_ip_addr.u.v4, attr->nas_ip_addr, 4) !=
634 (hapd->conf->own_ip_addr.af != AF_INET6 ||
635 os_memcmp(&hapd->conf->own_ip_addr.u.v6, attr->nas_ipv6_addr, 16)
886 struct hostapd_bss_config *conf = hapd->conf;
894 __func__, hapd, conf->iface, first);
897 if (conf->tnc && tncs_global_init() < 0) {
905 __func__, conf->iface);
913 if (!is_zero_ether_addr(conf->bssid)) {
915 os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN);
922 "the radio", conf->iface);
936 conf->iface, addr, hapd,
938 conf->bridge[0] ? conf->bridge : NULL,
950 if (conf->wmm_enabled < 0)
951 conf->wmm_enabled = hapd->iconf->ieee80211n;
954 if (is_zero_ether_addr(conf->r1_key_holder))
955 os_memcpy(conf->r1_key_holder, hapd->own_addr, ETH_ALEN);
969 if (hostapd_setup_encryption(conf->iface, hapd))
982 if (conf->ssid.ssid_set) {
988 set_ssid = (conf->ssid.ssid_len != (size_t) ssid_len ||
989 os_memcmp(conf->ssid.ssid, ssid, ssid_len) != 0);
996 conf->ssid.ssid_len = ssid_len;
997 os_memcpy(conf->ssid.ssid, ssid, conf->ssid.ssid_len);
1003 conf->iface, MAC2STR(hapd->own_addr),
1004 wpa_ssid_txt(conf->ssid.ssid, conf->ssid.ssid_len));
1007 if (hostapd_setup_wpa_psk(conf)) {
1014 if (set_ssid && hostapd_set_ssid(hapd, conf->ssid.ssid,
1015 conf->ssid.ssid_len)) {
1021 conf->radius->msg_dumps = 1;
1023 hapd->radius = radius_client_init(hapd, conf->radius);
1029 if (conf->radius_das_port) {
1032 das_conf.port = conf->radius_das_port;
1033 das_conf.shared_secret = conf->radius_das_shared_secret;
1035 conf->radius_das_shared_secret_len;
1036 das_conf.client_addr = &conf->radius_das_client_addr;
1037 das_conf.time_window = conf->radius_das_time_window;
1039 conf->radius_das_require_event_timestamp;
1055 if (hostapd_init_wps(hapd, conf))
1066 if ((conf->wpa || conf->osen) && hostapd_setup_wpa(hapd))
1074 if (conf->ieee802_11f &&
1075 (hapd->iapp = iapp_init(hapd, conf->iapp_iface)) == NULL) {
1087 if (conf->qos_map_set_len &&
1088 hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
1089 conf->qos_map_set_len)) {
1095 if (conf->bss_load_update_period && bss_load_update_init(hapd)) {
1100 if (conf->proxy_arp) {
1125 if (!conf->start_disabled && ieee802_11_set_beacon(hapd) < 0)
1150 p = &iface->conf->tx_queue[i];
1191 struct hostapd_config *conf = hapd->iconf;
1198 if (conf->bss[0]->macaddr_acl == DENY_UNLESS_ACCEPTED) {
1200 err = hostapd_set_acl_list(hapd, conf->bss[0]->accept_mac,
1201 conf->bss[0]->num_accept_mac,
1207 } else if (conf->bss[0]->macaddr_acl == ACCEPT_UNLESS_DENIED) {
1209 err = hostapd_set_acl_list(hapd, conf->bss[0]->deny_mac,
1210 conf->bss[0]->num_deny_mac,
1229 hapd->conf->iface);
1249 hapd->conf->iface);
1387 if (iface->conf->ieee80211h)
1540 if (iface->conf->channel) {
1545 iface->freq = hostapd_hw_get_freq(hapd, iface->conf->channel);
1548 hostapd_hw_mode_txt(iface->conf->hw_mode),
1549 iface->conf->channel, iface->freq);
1585 iface->bss[0]->conf->iface);
1644 if (is_zero_ether_addr(hapd->conf->bssid))
1692 iface->fst = fst_attach(hapd->conf->iface, hapd->own_addr,
1708 iface->bss[0]->conf->iface);
1781 iface->bss[0]->conf->iface);
1790 iface->bss[0]->conf->iface);
1796 iface->bss[0]->conf->iface);
1836 iface->bss[0]->conf->iface);
1847 * @conf: Pointer to per-interface configuration
1857 struct hostapd_config *conf,
1867 hapd->iconf = conf;
1868 hapd->conf = bss;
1881 hapd->conf->iface);
1945 struct hostapd_config *conf = NULL;
1957 conf = interfaces->config_read_cb(hapd_iface->config_fname);
1958 if (conf == NULL)
1960 hapd_iface->conf = conf;
1962 hapd_iface->num_bss = conf->num_bss;
1963 hapd_iface->bss = os_calloc(conf->num_bss,
1968 for (i = 0; i < conf->num_bss; i++) {
1970 hostapd_alloc_bss_data(hapd_iface, conf,
1971 conf->bss[i]);
1982 if (conf)
1983 hostapd_config_free(conf);
2003 if (os_strcmp(ifname, hapd->conf->iface) == 0)
2045 struct hostapd_config *conf;
2052 conf = interfaces->config_read_cb(config_fname);
2053 if (conf == NULL)
2055 if (conf->num_bss > 1) {
2057 hostapd_config_free(conf);
2061 ifname = conf->bss[0]->iface;
2065 hostapd_config_free(conf);
2070 iface->conf->bss, iface->conf->num_bss + 1,
2077 iface->conf->bss = tmp_conf;
2078 iface->conf->last_bss = tmp_conf[0];
2081 hostapd_config_free(conf);
2084 bss = iface->conf->bss[iface->conf->num_bss] = conf->bss[0];
2085 iface->conf->num_bss++;
2087 hapd = hostapd_alloc_bss_data(iface, iface->conf, bss);
2089 iface->conf->num_bss--;
2090 hostapd_config_free(conf);
2093 iface->conf->last_bss = bss;
2098 conf->num_bss--;
2099 conf->bss[0] = NULL;
2100 hostapd_config_free(conf);
2112 if (iface->bss[bss_idx]->conf->logger_stdout_level > 0)
2113 iface->bss[bss_idx]->conf->logger_stdout_level--;
2116 if (iface->conf->bss[bss_idx]->iface[0] == '\0' &&
2137 wpa_printf(MSG_DEBUG, "%s: num_bss=%u conf->num_bss=%u",
2139 (unsigned int) iface->conf->num_bss);
2180 hapd_iface->conf->bss[0]->iface);
2185 hapd_iface->conf->bss[0]->iface);
2188 hostapd_set_security_params(hapd_iface->conf->bss[j], 1);
2189 if (hostapd_config_check(hapd_iface->conf, 1) < 0) {
2215 hapd_iface->conf->bss[0]->iface);
2217 hostapd_set_security_params(hapd_iface->conf->bss[j], 1);
2218 if (hostapd_config_check(hapd_iface->conf, 1) < 0) {
2241 hapd_iface->conf->bss[0]->iface);
2268 hapd_iface->bss[0]->conf->iface);
2303 struct hostapd_config *conf;
2305 /* Allocates memory for bss and conf */
2306 conf = hostapd_config_defaults();
2307 if (conf == NULL) {
2318 conf->driver = wpa_drivers[j];
2328 conf->driver = wpa_drivers[0];
2329 if (conf->driver == NULL) {
2331 hostapd_config_free(conf);
2336 bss = conf->last_bss = conf->bss[0];
2341 hostapd_config_free(conf);
2349 return conf;
2354 struct hostapd_config *conf)
2359 hapd_iface->bss = os_calloc(conf->num_bss,
2364 for (i = 0; i < conf->num_bss; i++) {
2366 hostapd_alloc_bss_data(hapd_iface, conf, conf->bss[i]);
2380 hapd_iface->conf = conf;
2381 hapd_iface->num_bss = conf->num_bss;
2389 struct hostapd_config *conf = NULL;
2453 hapd_iface->conf->num_bss--;
2456 __func__, hapd, hapd->conf->iface);
2457 hostapd_config_free_bss(hapd->conf);
2458 hapd->conf = NULL;
2475 if (!os_strcmp(interfaces->iface[i]->conf->bss[0]->iface,
2492 conf = interfaces->config_read_cb(conf_file);
2493 if (conf && conf->bss)
2494 os_strlcpy(conf->bss[0]->iface, buf,
2495 sizeof(conf->bss[0]->iface));
2501 conf = hostapd_config_alloc(interfaces, buf, ptr, driver);
2504 if (conf == NULL || conf->bss == NULL) {
2510 if (hostapd_data_alloc(hapd_iface, conf) < 0) {
2515 conf = NULL;
2521 hapd_iface->conf->bss[0]->iface);
2526 if (conf)
2527 hostapd_config_free(conf);
2540 hapd->conf->iface);
2562 wpa_printf(MSG_INFO, "Remove BSS '%s'", iface->conf->bss[idx]->iface);
2570 __func__, hapd, hapd->conf->iface);
2571 hostapd_config_free_bss(hapd->conf);
2572 hapd->conf = NULL;
2580 hostapd_config_free_bss(iface->conf->bss[idx]);
2581 iface->conf->bss[idx] = NULL;
2584 iface->conf->num_bss--;
2585 for (i = idx; i < iface->conf->num_bss; i++)
2586 iface->conf->bss[i] = iface->conf->bss[i + 1];
2601 if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
2618 for (j = 0; j < hapd_iface->conf->num_bss; j++) {
2619 if (!os_strcmp(hapd_iface->conf->bss[j]->iface, buf)) {
2655 if (hapd->conf->ieee802_11f)
2670 if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) {
2689 hapd->conf->iface, __func__, MAC2STR(sta->addr),
2690 hapd->conf->ap_max_inactivity);
2692 eloop_register_timeout(hapd->conf->ap_max_inactivity, 0,
2724 iface->conf->bss[0]->iface, hostapd_state_text(iface->state),
2857 struct hostapd_config *conf,
2874 hostapd_set_freq_params(old_params, conf->hw_mode,
2875 hostapd_hw_get_freq(hapd, conf->channel),
2876 conf->channel, conf->ieee80211n,
2877 conf->ieee80211ac,
2878 conf->secondary_channel,
2879 conf->vht_oper_chwidth,
2880 conf->vht_oper_centr_freq_seg0_idx,
2881 conf->vht_oper_centr_freq_seg1_idx,
2882 conf->vht_capab))
2889 conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT;
2893 conf->vht_oper_chwidth = VHT_CHANWIDTH_80P80MHZ;
2895 conf->vht_oper_chwidth = VHT_CHANWIDTH_80MHZ;
2898 conf->vht_oper_chwidth = VHT_CHANWIDTH_160MHZ;
2904 conf->channel = channel;
2905 conf->ieee80211n = params->ht_enabled;
2906 conf->secondary_channel = params->sec_channel_offset;
2908 &conf->vht_oper_centr_freq_seg0_idx);
2910 &conf->vht_oper_centr_freq_seg1_idx);
2961 ret = hostapd_change_config_freq(iface->bss[0], iface->conf,
2970 hostapd_change_config_freq(iface->bss[0], iface->conf,
3074 iface->conf->channel = freq_params->channel;
3075 iface->conf->secondary_channel = freq_params->sec_channel_offset;
3076 iface->conf->vht_oper_centr_freq_seg0_idx = vht_seg0_idx;
3077 iface->conf->vht_oper_centr_freq_seg1_idx = vht_seg1_idx;
3078 iface->conf->vht_oper_chwidth = vht_bw;
3079 iface->conf->ieee80211n = freq_params->ht_enabled;
3080 iface->conf->ieee80211ac = freq_params->vht_enabled;
3107 if (os_strcmp(ifname, hapd->conf->iface) == 0)