• Home
  • Raw
  • Download

Lines Matching refs:conf

83 	radius_client_reconfig(hapd->radius, hapd->conf->radius);  in hostapd_reload_bss()
86 ssid = &hapd->conf->ssid; in hostapd_reload_bss()
93 hostapd_config_clear_wpa_psk(&hapd->conf->ssid.wpa_psk); in hostapd_reload_bss()
95 if (hostapd_setup_wpa_psk(hapd->conf)) { in hostapd_reload_bss()
100 if (hapd->conf->ieee802_1x || hapd->conf->wpa) in hostapd_reload_bss()
101 hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 1); in hostapd_reload_bss()
103 hostapd_set_drv_ieee8021x(hapd, hapd->conf->iface, 0); in hostapd_reload_bss()
105 if ((hapd->conf->wpa || hapd->conf->osen) && hapd->wpa_auth == NULL) { in hostapd_reload_bss()
109 } else if (hapd->conf->wpa) { in hostapd_reload_bss()
121 hostapd_setup_encryption(hapd->conf->iface, hapd); in hostapd_reload_bss()
128 if (hapd->conf->ssid.ssid_set && in hostapd_reload_bss()
129 hostapd_set_ssid(hapd, hapd->conf->ssid.ssid, in hostapd_reload_bss()
130 hapd->conf->ssid.ssid_len)) { in hostapd_reload_bss()
134 wpa_printf(MSG_DEBUG, "Reconfigured interface %s", hapd->conf->iface); in hostapd_reload_bss()
184 iface->conf = newconf; in hostapd_reload_config()
201 hapd->conf = newconf->bss[j]; in hostapd_reload_config()
228 if (hapd->conf->ieee80211w) { in hostapd_broadcast_key_clear_iface()
245 hostapd_broadcast_key_clear_iface(hapd, hapd->conf->iface); in hostapd_broadcast_wep_clear()
253 struct hostapd_ssid *ssid = &hapd->conf->ssid; in hostapd_broadcast_wep_set()
257 hostapd_drv_set_key(hapd->conf->iface, in hostapd_broadcast_wep_set()
284 __func__, hapd->conf->iface); in hostapd_free_hapd_data()
289 wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface); in hostapd_free_hapd_data()
309 if (hostapd_if_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface)) { in hostapd_free_hapd_data()
312 hapd->conf->iface); in hostapd_free_hapd_data()
363 hapd->conf->iface); in hostapd_cleanup()
421 hostapd_config_free(iface->conf); in hostapd_cleanup_iface()
422 iface->conf = NULL; in hostapd_cleanup_iface()
446 if (hapd->conf->ssid.wep.default_len) { in hostapd_setup_encryption()
455 hostapd_drv_set_authmode(hapd, hapd->conf->auth_algs); in hostapd_setup_encryption()
458 if (hapd->conf->ssid.wep.key[i] && in hostapd_setup_encryption()
460 i == hapd->conf->ssid.wep.idx, NULL, 0, in hostapd_setup_encryption()
461 hapd->conf->ssid.wep.key[i], in hostapd_setup_encryption()
462 hapd->conf->ssid.wep.len[i])) { in hostapd_setup_encryption()
467 if (hapd->conf->ssid.wep.key[i] && in hostapd_setup_encryption()
468 i == hapd->conf->ssid.wep.idx) in hostapd_setup_encryption()
522 unsigned int i = iface->conf->num_bss, bits = 0, j; in hostapd_validate_bssid_configuration()
528 if (iface->conf->use_driver_iface_addr) in hostapd_validate_bssid_configuration()
539 for (j = 0; j < iface->conf->num_bss; j++) { in hostapd_validate_bssid_configuration()
540 if (is_zero_ether_addr(iface->conf->bss[j]->bssid)) { in hostapd_validate_bssid_configuration()
548 iface->conf->bss[j]->bssid[i] ^ in hostapd_validate_bssid_configuration()
587 (unsigned long) iface->conf->num_bss, MAC2STR(mask), bits); in hostapd_validate_bssid_configuration()
608 static int mac_in_conf(struct hostapd_config *conf, const void *a) in mac_in_conf() argument
612 for (i = 0; i < conf->num_bss; i++) { in mac_in_conf()
613 if (hostapd_mac_comp(conf->bss[i]->bssid, a) == 0) { in mac_in_conf()
628 (!hapd->conf->nas_identifier || in hostapd_das_nas_mismatch()
629 os_strlen(hapd->conf->nas_identifier) != in hostapd_das_nas_mismatch()
631 os_memcmp(hapd->conf->nas_identifier, attr->nas_identifier, in hostapd_das_nas_mismatch()
638 (hapd->conf->own_ip_addr.af != AF_INET || in hostapd_das_nas_mismatch()
639 os_memcmp(&hapd->conf->own_ip_addr.u.v4, attr->nas_ip_addr, 4) != in hostapd_das_nas_mismatch()
647 (hapd->conf->own_ip_addr.af != AF_INET6 || in hostapd_das_nas_mismatch()
648 os_memcmp(&hapd->conf->own_ip_addr.u.v6, attr->nas_ipv6_addr, 16) in hostapd_das_nas_mismatch()
899 struct hostapd_bss_config *conf = hapd->conf; in hostapd_setup_bss() local
907 __func__, hapd, conf->iface, first); in hostapd_setup_bss()
910 if (conf->tnc && tncs_global_init() < 0) { in hostapd_setup_bss()
918 __func__, conf->iface); in hostapd_setup_bss()
926 if (!is_zero_ether_addr(conf->bssid)) { in hostapd_setup_bss()
928 os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN); in hostapd_setup_bss()
935 "the radio", conf->iface); in hostapd_setup_bss()
949 conf->iface, addr, hapd, in hostapd_setup_bss()
951 conf->bridge[0] ? conf->bridge : NULL, in hostapd_setup_bss()
963 if (conf->wmm_enabled < 0) in hostapd_setup_bss()
964 conf->wmm_enabled = hapd->iconf->ieee80211n; in hostapd_setup_bss()
967 if (is_zero_ether_addr(conf->r1_key_holder)) in hostapd_setup_bss()
968 os_memcpy(conf->r1_key_holder, hapd->own_addr, ETH_ALEN); in hostapd_setup_bss()
982 if (hostapd_setup_encryption(conf->iface, hapd)) in hostapd_setup_bss()
995 if (conf->ssid.ssid_set) { in hostapd_setup_bss()
1001 set_ssid = (conf->ssid.ssid_len != (size_t) ssid_len || in hostapd_setup_bss()
1002 os_memcmp(conf->ssid.ssid, ssid, ssid_len) != 0); in hostapd_setup_bss()
1009 conf->ssid.ssid_len = ssid_len; in hostapd_setup_bss()
1010 os_memcpy(conf->ssid.ssid, ssid, conf->ssid.ssid_len); in hostapd_setup_bss()
1016 conf->iface, MAC2STR(hapd->own_addr), in hostapd_setup_bss()
1017 wpa_ssid_txt(conf->ssid.ssid, conf->ssid.ssid_len)); in hostapd_setup_bss()
1020 if (hostapd_setup_wpa_psk(conf)) { in hostapd_setup_bss()
1027 if (set_ssid && hostapd_set_ssid(hapd, conf->ssid.ssid, in hostapd_setup_bss()
1028 conf->ssid.ssid_len)) { in hostapd_setup_bss()
1034 conf->radius->msg_dumps = 1; in hostapd_setup_bss()
1036 hapd->radius = radius_client_init(hapd, conf->radius); in hostapd_setup_bss()
1042 if (conf->radius_das_port) { in hostapd_setup_bss()
1045 das_conf.port = conf->radius_das_port; in hostapd_setup_bss()
1046 das_conf.shared_secret = conf->radius_das_shared_secret; in hostapd_setup_bss()
1048 conf->radius_das_shared_secret_len; in hostapd_setup_bss()
1049 das_conf.client_addr = &conf->radius_das_client_addr; in hostapd_setup_bss()
1050 das_conf.time_window = conf->radius_das_time_window; in hostapd_setup_bss()
1052 conf->radius_das_require_event_timestamp; in hostapd_setup_bss()
1054 conf->radius_das_require_message_authenticator; in hostapd_setup_bss()
1070 if (hostapd_init_wps(hapd, conf)) in hostapd_setup_bss()
1081 if ((conf->wpa || conf->osen) && hostapd_setup_wpa(hapd)) in hostapd_setup_bss()
1089 if (conf->ieee802_11f && in hostapd_setup_bss()
1090 (hapd->iapp = iapp_init(hapd, conf->iapp_iface)) == NULL) { in hostapd_setup_bss()
1102 if (conf->qos_map_set_len && in hostapd_setup_bss()
1103 hostapd_drv_set_qos_map(hapd, conf->qos_map_set, in hostapd_setup_bss()
1104 conf->qos_map_set_len)) { in hostapd_setup_bss()
1110 if (conf->bss_load_update_period && bss_load_update_init(hapd)) { in hostapd_setup_bss()
1115 if (conf->proxy_arp) { in hostapd_setup_bss()
1140 if (!conf->start_disabled && ieee802_11_set_beacon(hapd) < 0) in hostapd_setup_bss()
1165 p = &iface->conf->tx_queue[i]; in hostapd_tx_queue_params()
1206 struct hostapd_config *conf = hapd->iconf; in hostapd_set_acl() local
1213 if (conf->bss[0]->macaddr_acl == DENY_UNLESS_ACCEPTED) { in hostapd_set_acl()
1215 err = hostapd_set_acl_list(hapd, conf->bss[0]->accept_mac, in hostapd_set_acl()
1216 conf->bss[0]->num_accept_mac, in hostapd_set_acl()
1222 } else if (conf->bss[0]->macaddr_acl == ACCEPT_UNLESS_DENIED) { in hostapd_set_acl()
1224 err = hostapd_set_acl_list(hapd, conf->bss[0]->deny_mac, in hostapd_set_acl()
1225 conf->bss[0]->num_deny_mac, in hostapd_set_acl()
1244 hapd->conf->iface); in start_ctrl_iface_bss()
1264 hapd->conf->iface); in start_ctrl_iface()
1402 if (iface->conf->ieee80211h) in setup_interface2()
1567 int ht = hapd->iconf->ieee80211n && !hapd->conf->disable_11n; in hostapd_set_own_neighbor_report()
1568 int vht = hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac; in hostapd_set_own_neighbor_report()
1576 if (!(hapd->conf->radio_measurements[0] & in hostapd_set_own_neighbor_report()
1589 if (hapd->conf->wmm_enabled) { in hostapd_set_own_neighbor_report()
1592 if (hapd->conf->wmm_uapsd && in hostapd_set_own_neighbor_report()
1626 ssid.ssid_len = hapd->conf->ssid.ssid_len; in hostapd_set_own_neighbor_report()
1627 os_memcpy(ssid.ssid, hapd->conf->ssid.ssid, ssid.ssid_len); in hostapd_set_own_neighbor_report()
1675 if (iface->conf->channel) { in hostapd_setup_interface_complete_sync()
1680 iface->freq = hostapd_hw_get_freq(hapd, iface->conf->channel); in hostapd_setup_interface_complete_sync()
1683 hostapd_hw_mode_txt(iface->conf->hw_mode), in hostapd_setup_interface_complete_sync()
1684 iface->conf->channel, iface->freq); in hostapd_setup_interface_complete_sync()
1720 iface->bss[0]->conf->iface); in hostapd_setup_interface_complete_sync()
1779 if (is_zero_ether_addr(hapd->conf->bssid)) in hostapd_setup_interface_complete_sync()
1826 iface->fst = fst_attach(hapd->conf->iface, hapd->own_addr, in hostapd_setup_interface_complete_sync()
1842 iface->bss[0]->conf->iface); in hostapd_setup_interface_complete_sync()
1918 iface->bss[0]->conf->iface); in hostapd_setup_interface_complete()
1927 iface->bss[0]->conf->iface); in hostapd_setup_interface_complete()
1933 iface->bss[0]->conf->iface); in hostapd_setup_interface_complete()
1973 iface->bss[0]->conf->iface); in hostapd_setup_interface()
1994 struct hostapd_config *conf, in hostapd_alloc_bss_data() argument
2004 hapd->iconf = conf; in hostapd_alloc_bss_data()
2005 hapd->conf = bss; in hostapd_alloc_bss_data()
2007 if (conf) in hostapd_alloc_bss_data()
2008 hapd->driver = conf->driver; in hostapd_alloc_bss_data()
2023 hapd->conf->iface); in hostapd_bss_deinit()
2106 struct hostapd_config *conf = NULL; in hostapd_init() local
2118 conf = interfaces->config_read_cb(hapd_iface->config_fname); in hostapd_init()
2119 if (conf == NULL) in hostapd_init()
2121 hapd_iface->conf = conf; in hostapd_init()
2123 hapd_iface->num_bss = conf->num_bss; in hostapd_init()
2124 hapd_iface->bss = os_calloc(conf->num_bss, in hostapd_init()
2129 for (i = 0; i < conf->num_bss; i++) { in hostapd_init()
2131 hostapd_alloc_bss_data(hapd_iface, conf, in hostapd_init()
2132 conf->bss[i]); in hostapd_init()
2143 if (conf) in hostapd_init()
2144 hostapd_config_free(conf); in hostapd_init()
2164 if (os_strcmp(ifname, hapd->conf->iface) == 0) in ifname_in_use()
2206 struct hostapd_config *conf; in hostapd_interface_init_bss() local
2213 conf = interfaces->config_read_cb(config_fname); in hostapd_interface_init_bss()
2214 if (conf == NULL) in hostapd_interface_init_bss()
2216 if (conf->num_bss > 1) { in hostapd_interface_init_bss()
2218 hostapd_config_free(conf); in hostapd_interface_init_bss()
2222 ifname = conf->bss[0]->iface; in hostapd_interface_init_bss()
2226 hostapd_config_free(conf); in hostapd_interface_init_bss()
2231 iface->conf->bss, iface->conf->num_bss + 1, in hostapd_interface_init_bss()
2238 iface->conf->bss = tmp_conf; in hostapd_interface_init_bss()
2239 iface->conf->last_bss = tmp_conf[0]; in hostapd_interface_init_bss()
2242 hostapd_config_free(conf); in hostapd_interface_init_bss()
2245 bss = iface->conf->bss[iface->conf->num_bss] = conf->bss[0]; in hostapd_interface_init_bss()
2246 iface->conf->num_bss++; in hostapd_interface_init_bss()
2248 hapd = hostapd_alloc_bss_data(iface, iface->conf, bss); in hostapd_interface_init_bss()
2250 iface->conf->num_bss--; in hostapd_interface_init_bss()
2251 hostapd_config_free(conf); in hostapd_interface_init_bss()
2254 iface->conf->last_bss = bss; in hostapd_interface_init_bss()
2259 conf->num_bss--; in hostapd_interface_init_bss()
2260 conf->bss[0] = NULL; in hostapd_interface_init_bss()
2261 hostapd_config_free(conf); in hostapd_interface_init_bss()
2273 if (iface->bss[bss_idx]->conf->logger_stdout_level > 0) in hostapd_interface_init_bss()
2274 iface->bss[bss_idx]->conf->logger_stdout_level--; in hostapd_interface_init_bss()
2277 if (iface->conf->bss[bss_idx]->iface[0] == '\0' && in hostapd_interface_init_bss()
2300 (unsigned int) iface->conf->num_bss); in hostapd_interface_deinit_free()
2341 hapd_iface->conf->bss[0]->iface); in hostapd_enable_iface()
2346 hapd_iface->conf->bss[0]->iface); in hostapd_enable_iface()
2349 hostapd_set_security_params(hapd_iface->conf->bss[j], 1); in hostapd_enable_iface()
2350 if (hostapd_config_check(hapd_iface->conf, 1) < 0) { in hostapd_enable_iface()
2376 hapd_iface->conf->bss[0]->iface); in hostapd_reload_iface()
2378 hostapd_set_security_params(hapd_iface->conf->bss[j], 1); in hostapd_reload_iface()
2379 if (hostapd_config_check(hapd_iface->conf, 1) < 0) { in hostapd_reload_iface()
2402 hapd_iface->conf->bss[0]->iface); in hostapd_disable_iface()
2429 hapd_iface->bss[0]->conf->iface); in hostapd_disable_iface()
2464 struct hostapd_config *conf; in hostapd_config_alloc() local
2467 conf = hostapd_config_defaults(); in hostapd_config_alloc()
2468 if (conf == NULL) { in hostapd_config_alloc()
2479 conf->driver = wpa_drivers[j]; in hostapd_config_alloc()
2489 conf->driver = wpa_drivers[0]; in hostapd_config_alloc()
2490 if (conf->driver == NULL) { in hostapd_config_alloc()
2492 hostapd_config_free(conf); in hostapd_config_alloc()
2497 bss = conf->last_bss = conf->bss[0]; in hostapd_config_alloc()
2502 hostapd_config_free(conf); in hostapd_config_alloc()
2510 return conf; in hostapd_config_alloc()
2515 struct hostapd_config *conf) in hostapd_data_alloc() argument
2520 hapd_iface->bss = os_calloc(conf->num_bss, in hostapd_data_alloc()
2525 for (i = 0; i < conf->num_bss; i++) { in hostapd_data_alloc()
2527 hostapd_alloc_bss_data(hapd_iface, conf, conf->bss[i]); in hostapd_data_alloc()
2541 hapd_iface->conf = conf; in hostapd_data_alloc()
2542 hapd_iface->num_bss = conf->num_bss; in hostapd_data_alloc()
2550 struct hostapd_config *conf = NULL; in hostapd_add_iface() local
2614 hapd_iface->conf->num_bss--; in hostapd_add_iface()
2617 __func__, hapd, hapd->conf->iface); in hostapd_add_iface()
2618 hostapd_config_free_bss(hapd->conf); in hostapd_add_iface()
2619 hapd->conf = NULL; in hostapd_add_iface()
2636 if (!os_strcmp(interfaces->iface[i]->conf->bss[0]->iface, in hostapd_add_iface()
2653 conf = interfaces->config_read_cb(conf_file); in hostapd_add_iface()
2654 if (conf && conf->bss) in hostapd_add_iface()
2655 os_strlcpy(conf->bss[0]->iface, buf, in hostapd_add_iface()
2656 sizeof(conf->bss[0]->iface)); in hostapd_add_iface()
2662 conf = hostapd_config_alloc(interfaces, buf, ptr, driver); in hostapd_add_iface()
2665 if (conf == NULL || conf->bss == NULL) { in hostapd_add_iface()
2671 if (hostapd_data_alloc(hapd_iface, conf) < 0) { in hostapd_add_iface()
2676 conf = NULL; in hostapd_add_iface()
2682 hapd_iface->conf->bss[0]->iface); in hostapd_add_iface()
2687 if (conf) in hostapd_add_iface()
2688 hostapd_config_free(conf); in hostapd_add_iface()
2701 hapd->conf->iface); in hostapd_add_iface()
2723 wpa_printf(MSG_INFO, "Remove BSS '%s'", iface->conf->bss[idx]->iface); in hostapd_remove_bss()
2731 __func__, hapd, hapd->conf->iface); in hostapd_remove_bss()
2732 hostapd_config_free_bss(hapd->conf); in hostapd_remove_bss()
2733 hapd->conf = NULL; in hostapd_remove_bss()
2741 hostapd_config_free_bss(iface->conf->bss[idx]); in hostapd_remove_bss()
2742 iface->conf->bss[idx] = NULL; in hostapd_remove_bss()
2745 iface->conf->num_bss--; in hostapd_remove_bss()
2746 for (i = idx; i < iface->conf->num_bss; i++) in hostapd_remove_bss()
2747 iface->conf->bss[i] = iface->conf->bss[i + 1]; in hostapd_remove_bss()
2762 if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) { in hostapd_remove_iface()
2779 for (j = 0; j < hapd_iface->conf->num_bss; j++) { in hostapd_remove_iface()
2780 if (!os_strcmp(hapd_iface->conf->bss[j]->iface, buf)) { in hostapd_remove_iface()
2816 if (hapd->conf->ieee802_11f) in hostapd_new_assoc_sta()
2831 if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) { in hostapd_new_assoc_sta()
2851 hapd->conf->iface, __func__, in hostapd_new_assoc_sta()
2859 hapd->conf->iface, __func__, MAC2STR(sta->addr), in hostapd_new_assoc_sta()
2860 hapd->conf->ap_max_inactivity); in hostapd_new_assoc_sta()
2862 eloop_register_timeout(hapd->conf->ap_max_inactivity, 0, in hostapd_new_assoc_sta()
2894 iface->conf ? iface->conf->bss[0]->iface : "N/A", in hostapd_set_state()
3027 struct hostapd_config *conf, in hostapd_change_config_freq() argument
3044 hostapd_set_freq_params(old_params, conf->hw_mode, in hostapd_change_config_freq()
3045 hostapd_hw_get_freq(hapd, conf->channel), in hostapd_change_config_freq()
3046 conf->channel, conf->ieee80211n, in hostapd_change_config_freq()
3047 conf->ieee80211ac, in hostapd_change_config_freq()
3048 conf->secondary_channel, in hostapd_change_config_freq()
3049 conf->vht_oper_chwidth, in hostapd_change_config_freq()
3050 conf->vht_oper_centr_freq_seg0_idx, in hostapd_change_config_freq()
3051 conf->vht_oper_centr_freq_seg1_idx, in hostapd_change_config_freq()
3052 conf->vht_capab)) in hostapd_change_config_freq()
3059 conf->vht_oper_chwidth = VHT_CHANWIDTH_USE_HT; in hostapd_change_config_freq()
3063 conf->vht_oper_chwidth = VHT_CHANWIDTH_80P80MHZ; in hostapd_change_config_freq()
3065 conf->vht_oper_chwidth = VHT_CHANWIDTH_80MHZ; in hostapd_change_config_freq()
3068 conf->vht_oper_chwidth = VHT_CHANWIDTH_160MHZ; in hostapd_change_config_freq()
3074 conf->channel = channel; in hostapd_change_config_freq()
3075 conf->ieee80211n = params->ht_enabled; in hostapd_change_config_freq()
3076 conf->secondary_channel = params->sec_channel_offset; in hostapd_change_config_freq()
3078 &conf->vht_oper_centr_freq_seg0_idx); in hostapd_change_config_freq()
3080 &conf->vht_oper_centr_freq_seg1_idx); in hostapd_change_config_freq()
3131 ret = hostapd_change_config_freq(iface->bss[0], iface->conf, in hostapd_fill_csa_settings()
3140 hostapd_change_config_freq(iface->bss[0], iface->conf, in hostapd_fill_csa_settings()
3244 iface->conf->channel = freq_params->channel; in hostapd_switch_channel_fallback()
3245 iface->conf->secondary_channel = freq_params->sec_channel_offset; in hostapd_switch_channel_fallback()
3246 iface->conf->vht_oper_centr_freq_seg0_idx = vht_seg0_idx; in hostapd_switch_channel_fallback()
3247 iface->conf->vht_oper_centr_freq_seg1_idx = vht_seg1_idx; in hostapd_switch_channel_fallback()
3248 iface->conf->vht_oper_chwidth = vht_bw; in hostapd_switch_channel_fallback()
3249 iface->conf->ieee80211n = freq_params->ht_enabled; in hostapd_switch_channel_fallback()
3250 iface->conf->ieee80211ac = freq_params->vht_enabled; in hostapd_switch_channel_fallback()
3277 if (os_strcmp(ifname, hapd->conf->iface) == 0) in hostapd_get_iface()