Home | History | Annotate | Download | only in ap

Lines Matching defs:bss

24 static void hostapd_config_free_vlan(struct hostapd_bss_config *bss)
28 vlan = bss->vlan;
36 bss->vlan = NULL;
44 void hostapd_config_defaults_bss(struct hostapd_bss_config *bss)
46 dl_list_init(&bss->anqp_elem);
48 bss->logger_syslog_level = HOSTAPD_LEVEL_INFO;
49 bss->logger_stdout_level = HOSTAPD_LEVEL_INFO;
50 bss->logger_syslog = (unsigned int) -1;
51 bss->logger_stdout = (unsigned int) -1;
53 bss->auth_algs = WPA_AUTH_ALG_OPEN | WPA_AUTH_ALG_SHARED;
55 bss->wep_rekeying_period = 300;
57 bss->broadcast_key_idx_min = 1;
58 bss->broadcast_key_idx_max = 2;
59 bss->eap_reauth_period = 3600;
61 bss->wpa_group_rekey = 600;
62 bss->wpa_gmk_rekey = 86400;
63 bss->wpa_group_update_count = 4;
64 bss->wpa_pairwise_update_count = 4;
65 bss->wpa_disable_eapol_key_retries =
67 bss->wpa_key_mgmt = WPA_KEY_MGMT_PSK;
68 bss->wpa_pairwise = WPA_CIPHER_TKIP;
69 bss->wpa_group = WPA_CIPHER_TKIP;
70 bss->rsn_pairwise = 0;
72 bss->max_num_sta = MAX_STA_COUNT;
74 bss->dtim_period = 2;
76 bss->radius_server_auth_port = 1812;
77 bss->eap_sim_db_timeout = 1;
78 bss->ap_max_inactivity = AP_MAX_INACTIVITY;
79 bss->eapol_version = EAPOL_VERSION;
81 bss->max_listen_interval = 65535;
83 bss->pwd_group = 19; /* ECC: GF(p=256) */
86 bss->assoc_sa_query_max_timeout = 1000;
87 bss->assoc_sa_query_retry_timeout = 201;
88 bss->group_mgmt_cipher = WPA_CIPHER_AES_128_CMAC;
92 bss->eap_fast_prov = 3;
93 bss->pac_key_lifetime = 7 * 24 * 60 * 60;
94 bss->pac_key_refresh_time = 1 * 24 * 60 * 60;
98 bss->wmm_enabled = -1;
101 bss->ft_over_ds = 1;
102 bss->rkh_pos_timeout = 86400;
103 bss->rkh_neg_timeout = 60;
104 bss->rkh_pull_timeout = 1000;
105 bss->rkh_pull_retries = 4;
108 bss->radius_das_time_window = 300;
110 bss->sae_anti_clogging_threshold = 5;
112 bss->gas_frag_limit = 1400;
115 dl_list_init(&bss->fils_realms);
116 bss->fils_hlp_wait_time = 30;
117 bss->dhcp_server_port = DHCP_SERVER_PORT;
118 bss->dhcp_relay_port = DHCP_SERVER_PORT;
121 bss->broadcast_deauth = 1;
124 bss->mbo_cell_data_conn_pref = -1;
134 struct hostapd_bss_config *bss;
157 bss = os_zalloc(sizeof(*bss));
158 if (conf == NULL || bss == NULL) {
162 os_free(bss);
165 conf->bss = os_calloc(1, sizeof(struct hostapd_bss_config *));
166 if (conf->bss == NULL) {
168 os_free(bss);
171 conf->bss[0] = bss;
173 bss->radius = os_zalloc(sizeof(*bss->radius));
174 if (bss->radius == NULL) {
175 os_free(conf->bss);
177 os_free(bss);
181 hostapd_config_defaults_bss(bss);
661 hostapd_config_free_bss(conf->bss[i]);
662 os_free(conf->bss);
802 static int hostapd_config_check_bss(struct hostapd_bss_config *bss,
806 if (full_config && bss->ieee802_1x && !bss->eap_server &&
807 !bss->radius->auth_servers) {
813 if (bss->wpa) {
816 wep = bss->default_wep_key_len > 0 ||
817 bss->individual_wep_key_len > 0;
819 if (bss->ssid.wep.keys_set) {
831 if (full_config && bss->wpa &&
832 bss->wpa_psk_radius != PSK_RADIUS_IGNORED &&
833 bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) {
839 if (full_config && bss->wpa && (bss->wpa_key_mgmt & WPA_KEY_MGMT_PSK) &&
840 bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL &&
841 bss->ssid.wpa_psk_file == NULL &&
842 (bss->wpa_psk_radius != PSK_RADIUS_REQUIRED ||
843 bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH)) {
849 if (full_config && !is_zero_ether_addr(bss->bssid)) {
853 if (conf->bss[i] != bss &&
854 (hostapd_mac_comp(conf->bss[i]->bssid,
855 bss->bssid) == 0)) {
858 MAC2STR(bss->bssid),
859 conf->bss[i]->iface, bss->iface);
866 if (full_config && wpa_key_mgmt_ft(bss->wpa_key_mgmt) &&
867 (bss->nas_identifier == NULL ||
868 os_strlen(bss->nas_identifier) < 1 ||
869 os_strlen(bss->nas_identifier) > FT_R0KH_ID_MAX_LEN)) {
880 bss->disable_11n = 1;
886 bss->ssid.security_policy == SECURITY_STATIC_WEP) {
887 bss->disable_11n = 1;
892 if (full_config && conf->ieee80211n && bss->wpa &&
893 !(bss->wpa_pairwise & WPA_CIPHER_CCMP) &&
894 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP |
897 bss->disable_11n = 1;
906 bss->ssid.security_policy == SECURITY_STATIC_WEP) {
907 bss->disable_11ac = 1;
912 if (full_config && conf->ieee80211ac && bss->wpa &&
913 !(bss->wpa_pairwise & WPA_CIPHER_CCMP) &&
914 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP |
917 bss->disable_11ac = 1;
924 if (full_config && bss->wps_state && bss->ignore_broadcast_ssid) {
927 bss->wps_state = 0;
930 if (full_config && bss->wps_state &&
931 bss->ssid.wep.keys_set && bss->wpa == 0) {
934 bss->wps_state = 0;
937 if (full_config && bss->wps_state && bss->wpa &&
938 (!(bss->wpa & 2) ||
939 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP)))) {
942 bss->wps_state = 0;
947 if (full_config && bss->hs20 &&
948 (!(bss->wpa & 2) ||
949 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP |
960 if (full_config && bss->mbo_enabled && (bss->wpa & 2) &&
961 bss->ieee80211w == NO_MGMT_FRAME_PROTECTION) {
1030 if (hostapd_config_check_bss(conf->bss[i], conf, full_config))
1038 void hostapd_set_security_params(struct hostapd_bss_config *bss,
1041 if (bss->individual_wep_key_len == 0) {
1044 bss->broadcast_key_idx_min = 0;
1047 if ((bss->wpa & 2) && bss->rsn_pairwise == 0)
1048 bss->rsn_pairwise = bss->wpa_pairwise;
1049 bss->wpa_group = wpa_select_ap_group_cipher(bss->wpa, bss->wpa_pairwise,
1050 bss->rsn_pairwise);
1051 if (!bss->wpa_group_rekey_set)
1052 bss->wpa_group_rekey = bss->wpa_group == WPA_CIPHER_TKIP ?
1056 bss->radius->auth_server = bss->radius->auth_servers;
1057 bss->radius->acct_server = bss->radius->acct_servers;
1060 if (bss->wpa && bss->ieee802_1x) {
1061 bss->ssid.security_policy = SECURITY_WPA;
1062 } else if (bss->wpa) {
1063 bss->ssid.security_policy = SECURITY_WPA_PSK;
1064 } else if (bss->ieee802_1x) {
1066 bss->ssid.security_policy = SECURITY_IEEE_802_1X;
1067 bss->ssid.wep.default_len = bss->default_wep_key_len;
1068 if (full_config && bss->default_wep_key_len) {
1069 cipher = bss->default_wep_key_len >= 13 ?
1071 } else if (full_config && bss->ssid.wep.keys_set) {
1072 if (bss->ssid.wep.len[0] >= 13)
1077 bss->wpa_group = cipher;
1078 bss->wpa_pairwise = cipher;
1079 bss->rsn_pairwise = cipher;
1081 bss->wpa_key_mgmt = WPA_KEY_MGMT_IEEE8021X_NO_WPA;
1082 } else if (bss->ssid.wep.keys_set) {
1084 if (bss->ssid.wep.len[0] >= 13)
1086 bss->ssid.security_policy = SECURITY_STATIC_WEP;
1087 bss->wpa_group = cipher;
1088 bss->wpa_pairwise = cipher;
1089 bss->rsn_pairwise = cipher;
1091 bss->wpa_key_mgmt = WPA_KEY_MGMT_NONE;
1092 } else if (bss->osen) {
1093 bss->ssid.security_policy = SECURITY_OSEN;
1094 bss->wpa_group = WPA_CIPHER_CCMP;
1095 bss->wpa_pairwise = 0;
1096 bss->rsn_pairwise = WPA_CIPHER_CCMP;
1098 bss->ssid.security_policy = SECURITY_PLAINTEXT;
1100 bss->wpa_group = WPA_CIPHER_NONE;
1101 bss->wpa_pairwise = WPA_CIPHER_NONE;
1102 bss->rsn_pairwise = WPA_CIPHER_NONE;
1103 bss->wpa_key_mgmt = WPA_KEY_MGMT_NONE;