• Home
  • Raw
  • Download

Lines Matching refs:bss

28 static void hostapd_config_free_vlan(struct hostapd_bss_config *bss)  in hostapd_config_free_vlan()  argument
32 vlan = bss->vlan; in hostapd_config_free_vlan()
40 bss->vlan = NULL; in hostapd_config_free_vlan()
48 void hostapd_config_defaults_bss(struct hostapd_bss_config *bss) in hostapd_config_defaults_bss() argument
50 dl_list_init(&bss->anqp_elem); in hostapd_config_defaults_bss()
52 bss->logger_syslog_level = HOSTAPD_LEVEL_INFO; in hostapd_config_defaults_bss()
53 bss->logger_stdout_level = HOSTAPD_LEVEL_INFO; in hostapd_config_defaults_bss()
54 bss->logger_syslog = (unsigned int) -1; in hostapd_config_defaults_bss()
55 bss->logger_stdout = (unsigned int) -1; in hostapd_config_defaults_bss()
58 bss->auth_algs = WPA_AUTH_ALG_OPEN | WPA_AUTH_ALG_SHARED; in hostapd_config_defaults_bss()
60 bss->wep_rekeying_period = 300; in hostapd_config_defaults_bss()
62 bss->broadcast_key_idx_min = 1; in hostapd_config_defaults_bss()
63 bss->broadcast_key_idx_max = 2; in hostapd_config_defaults_bss()
65 bss->auth_algs = WPA_AUTH_ALG_OPEN; in hostapd_config_defaults_bss()
67 bss->eap_reauth_period = 3600; in hostapd_config_defaults_bss()
69 bss->wpa_group_rekey = 600; in hostapd_config_defaults_bss()
70 bss->wpa_gmk_rekey = 86400; in hostapd_config_defaults_bss()
71 bss->wpa_deny_ptk0_rekey = PTK0_REKEY_ALLOW_ALWAYS; in hostapd_config_defaults_bss()
72 bss->wpa_group_update_count = 4; in hostapd_config_defaults_bss()
73 bss->wpa_pairwise_update_count = 4; in hostapd_config_defaults_bss()
74 bss->wpa_disable_eapol_key_retries = in hostapd_config_defaults_bss()
76 bss->wpa_key_mgmt = WPA_KEY_MGMT_PSK; in hostapd_config_defaults_bss()
78 bss->wpa_pairwise = WPA_CIPHER_CCMP; in hostapd_config_defaults_bss()
79 bss->wpa_group = WPA_CIPHER_CCMP; in hostapd_config_defaults_bss()
81 bss->wpa_pairwise = WPA_CIPHER_TKIP; in hostapd_config_defaults_bss()
82 bss->wpa_group = WPA_CIPHER_TKIP; in hostapd_config_defaults_bss()
84 bss->rsn_pairwise = 0; in hostapd_config_defaults_bss()
86 bss->max_num_sta = MAX_STA_COUNT; in hostapd_config_defaults_bss()
88 bss->dtim_period = 2; in hostapd_config_defaults_bss()
90 bss->radius_server_auth_port = 1812; in hostapd_config_defaults_bss()
91 bss->eap_sim_db_timeout = 1; in hostapd_config_defaults_bss()
92 bss->eap_sim_id = 3; in hostapd_config_defaults_bss()
93 bss->ap_max_inactivity = AP_MAX_INACTIVITY; in hostapd_config_defaults_bss()
94 bss->eapol_version = EAPOL_VERSION; in hostapd_config_defaults_bss()
96 bss->max_listen_interval = 65535; in hostapd_config_defaults_bss()
98 bss->pwd_group = 19; /* ECC: GF(p=256) */ in hostapd_config_defaults_bss()
100 bss->assoc_sa_query_max_timeout = 1000; in hostapd_config_defaults_bss()
101 bss->assoc_sa_query_retry_timeout = 201; in hostapd_config_defaults_bss()
102 bss->group_mgmt_cipher = WPA_CIPHER_AES_128_CMAC; in hostapd_config_defaults_bss()
105 bss->eap_fast_prov = 3; in hostapd_config_defaults_bss()
106 bss->pac_key_lifetime = 7 * 24 * 60 * 60; in hostapd_config_defaults_bss()
107 bss->pac_key_refresh_time = 1 * 24 * 60 * 60; in hostapd_config_defaults_bss()
111 bss->wmm_enabled = -1; in hostapd_config_defaults_bss()
114 bss->ft_over_ds = 1; in hostapd_config_defaults_bss()
115 bss->rkh_pos_timeout = 86400; in hostapd_config_defaults_bss()
116 bss->rkh_neg_timeout = 60; in hostapd_config_defaults_bss()
117 bss->rkh_pull_timeout = 1000; in hostapd_config_defaults_bss()
118 bss->rkh_pull_retries = 4; in hostapd_config_defaults_bss()
119 bss->r0_key_lifetime = 1209600; in hostapd_config_defaults_bss()
122 bss->radius_das_time_window = 300; in hostapd_config_defaults_bss()
124 bss->sae_anti_clogging_threshold = 5; in hostapd_config_defaults_bss()
125 bss->sae_sync = 5; in hostapd_config_defaults_bss()
127 bss->gas_frag_limit = 1400; in hostapd_config_defaults_bss()
130 dl_list_init(&bss->fils_realms); in hostapd_config_defaults_bss()
131 bss->fils_hlp_wait_time = 30; in hostapd_config_defaults_bss()
132 bss->dhcp_server_port = DHCP_SERVER_PORT; in hostapd_config_defaults_bss()
133 bss->dhcp_relay_port = DHCP_SERVER_PORT; in hostapd_config_defaults_bss()
136 bss->broadcast_deauth = 1; in hostapd_config_defaults_bss()
139 bss->mbo_cell_data_conn_pref = -1; in hostapd_config_defaults_bss()
145 bss->tls_flags = TLS_CONN_DISABLE_TLSv1_3; in hostapd_config_defaults_bss()
147 bss->max_auth_rounds = 100; in hostapd_config_defaults_bss()
148 bss->max_auth_rounds_short = 50; in hostapd_config_defaults_bss()
150 bss->send_probe_response = 1; in hostapd_config_defaults_bss()
153 bss->hs20_release = (HS20_VERSION >> 4) + 1; in hostapd_config_defaults_bss()
157 bss->mka_priority = DEFAULT_PRIO_NOT_KEY_SERVER; in hostapd_config_defaults_bss()
158 bss->macsec_port = 1; in hostapd_config_defaults_bss()
162 bss->check_crl_strict = 1; in hostapd_config_defaults_bss()
171 struct hostapd_bss_config *bss; in hostapd_config_defaults() local
194 bss = os_zalloc(sizeof(*bss)); in hostapd_config_defaults()
195 if (conf == NULL || bss == NULL) { in hostapd_config_defaults()
199 os_free(bss); in hostapd_config_defaults()
202 conf->bss = os_calloc(1, sizeof(struct hostapd_bss_config *)); in hostapd_config_defaults()
203 if (conf->bss == NULL) { in hostapd_config_defaults()
205 os_free(bss); in hostapd_config_defaults()
208 conf->bss[0] = bss; in hostapd_config_defaults()
210 bss->radius = os_zalloc(sizeof(*bss->radius)); in hostapd_config_defaults()
211 if (bss->radius == NULL) { in hostapd_config_defaults()
212 os_free(conf->bss); in hostapd_config_defaults()
214 os_free(bss); in hostapd_config_defaults()
218 hostapd_config_defaults_bss(bss); in hostapd_config_defaults()
966 hostapd_config_free_bss(conf->bss[i]); in hostapd_config_free()
967 os_free(conf->bss); in hostapd_config_free()
1114 static int hostapd_config_check_bss(struct hostapd_bss_config *bss, in hostapd_config_check_bss() argument
1118 if (full_config && bss->ieee802_1x && !bss->eap_server && in hostapd_config_check_bss()
1119 !bss->radius->auth_servers) { in hostapd_config_check_bss()
1126 if (bss->wpa) { in hostapd_config_check_bss()
1129 wep = bss->default_wep_key_len > 0 || in hostapd_config_check_bss()
1130 bss->individual_wep_key_len > 0; in hostapd_config_check_bss()
1132 if (bss->ssid.wep.keys_set) { in hostapd_config_check_bss()
1145 if (full_config && bss->wpa && in hostapd_config_check_bss()
1146 bss->wpa_psk_radius != PSK_RADIUS_IGNORED && in hostapd_config_check_bss()
1147 bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH) { in hostapd_config_check_bss()
1153 if (full_config && bss->wpa && (bss->wpa_key_mgmt & WPA_KEY_MGMT_PSK) && in hostapd_config_check_bss()
1154 bss->ssid.wpa_psk == NULL && bss->ssid.wpa_passphrase == NULL && in hostapd_config_check_bss()
1155 bss->ssid.wpa_psk_file == NULL && in hostapd_config_check_bss()
1156 (bss->wpa_psk_radius != PSK_RADIUS_REQUIRED || in hostapd_config_check_bss()
1157 bss->macaddr_acl != USE_EXTERNAL_RADIUS_AUTH)) { in hostapd_config_check_bss()
1163 if (full_config && !is_zero_ether_addr(bss->bssid)) { in hostapd_config_check_bss()
1167 if (conf->bss[i] != bss && in hostapd_config_check_bss()
1168 (hostapd_mac_comp(conf->bss[i]->bssid, in hostapd_config_check_bss()
1169 bss->bssid) == 0)) { in hostapd_config_check_bss()
1172 MAC2STR(bss->bssid), in hostapd_config_check_bss()
1173 conf->bss[i]->iface, bss->iface); in hostapd_config_check_bss()
1180 if (full_config && wpa_key_mgmt_ft(bss->wpa_key_mgmt) && in hostapd_config_check_bss()
1181 (bss->nas_identifier == NULL || in hostapd_config_check_bss()
1182 os_strlen(bss->nas_identifier) < 1 || in hostapd_config_check_bss()
1183 os_strlen(bss->nas_identifier) > FT_R0KH_ID_MAX_LEN)) { in hostapd_config_check_bss()
1193 bss->disable_11n = 1; in hostapd_config_check_bss()
1200 bss->ssid.security_policy == SECURITY_STATIC_WEP) { in hostapd_config_check_bss()
1201 bss->disable_11n = 1; in hostapd_config_check_bss()
1207 if (full_config && conf->ieee80211n && bss->wpa && in hostapd_config_check_bss()
1208 !(bss->wpa_pairwise & WPA_CIPHER_CCMP) && in hostapd_config_check_bss()
1209 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP | in hostapd_config_check_bss()
1212 bss->disable_11n = 1; in hostapd_config_check_bss()
1221 bss->ssid.security_policy == SECURITY_STATIC_WEP) { in hostapd_config_check_bss()
1222 bss->disable_11ac = 1; in hostapd_config_check_bss()
1228 if (full_config && conf->ieee80211ac && bss->wpa && in hostapd_config_check_bss()
1229 !(bss->wpa_pairwise & WPA_CIPHER_CCMP) && in hostapd_config_check_bss()
1230 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP | in hostapd_config_check_bss()
1233 bss->disable_11ac = 1; in hostapd_config_check_bss()
1240 if (full_config && bss->wps_state && bss->ignore_broadcast_ssid) { in hostapd_config_check_bss()
1243 bss->wps_state = 0; in hostapd_config_check_bss()
1247 if (full_config && bss->wps_state && in hostapd_config_check_bss()
1248 bss->ssid.wep.keys_set && bss->wpa == 0) { in hostapd_config_check_bss()
1251 bss->wps_state = 0; in hostapd_config_check_bss()
1255 if (full_config && bss->wps_state && bss->wpa && in hostapd_config_check_bss()
1256 (!(bss->wpa & 2) || in hostapd_config_check_bss()
1257 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP | in hostapd_config_check_bss()
1262 bss->wps_state = 0; in hostapd_config_check_bss()
1267 if (full_config && bss->hs20 && in hostapd_config_check_bss()
1268 (!(bss->wpa & 2) || in hostapd_config_check_bss()
1269 !(bss->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP | in hostapd_config_check_bss()
1280 if (full_config && bss->mbo_enabled && (bss->wpa & 2) && in hostapd_config_check_bss()
1281 bss->ieee80211w == NO_MGMT_FRAME_PROTECTION) { in hostapd_config_check_bss()
1289 if (full_config && bss->ieee80211w == NO_MGMT_FRAME_PROTECTION && in hostapd_config_check_bss()
1290 bss->ocv) { in hostapd_config_check_bss()
1366 if (hostapd_config_check_bss(conf->bss[i], conf, full_config)) in hostapd_config_check()
1374 void hostapd_set_security_params(struct hostapd_bss_config *bss, in hostapd_set_security_params() argument
1378 if (bss->individual_wep_key_len == 0) { in hostapd_set_security_params()
1381 bss->broadcast_key_idx_min = 0; in hostapd_set_security_params()
1385 if ((bss->wpa & 2) && bss->rsn_pairwise == 0) in hostapd_set_security_params()
1386 bss->rsn_pairwise = bss->wpa_pairwise; in hostapd_set_security_params()
1387 if (bss->group_cipher) in hostapd_set_security_params()
1388 bss->wpa_group = bss->group_cipher; in hostapd_set_security_params()
1390 bss->wpa_group = wpa_select_ap_group_cipher(bss->wpa, in hostapd_set_security_params()
1391 bss->wpa_pairwise, in hostapd_set_security_params()
1392 bss->rsn_pairwise); in hostapd_set_security_params()
1393 if (!bss->wpa_group_rekey_set) in hostapd_set_security_params()
1394 bss->wpa_group_rekey = bss->wpa_group == WPA_CIPHER_TKIP ? in hostapd_set_security_params()
1398 bss->radius->auth_server = bss->radius->auth_servers; in hostapd_set_security_params()
1399 bss->radius->acct_server = bss->radius->acct_servers; in hostapd_set_security_params()
1402 if (bss->wpa && bss->ieee802_1x) { in hostapd_set_security_params()
1403 bss->ssid.security_policy = SECURITY_WPA; in hostapd_set_security_params()
1404 } else if (bss->wpa) { in hostapd_set_security_params()
1405 bss->ssid.security_policy = SECURITY_WPA_PSK; in hostapd_set_security_params()
1406 } else if (bss->ieee802_1x) { in hostapd_set_security_params()
1408 bss->ssid.security_policy = SECURITY_IEEE_802_1X; in hostapd_set_security_params()
1410 bss->ssid.wep.default_len = bss->default_wep_key_len; in hostapd_set_security_params()
1411 if (full_config && bss->default_wep_key_len) { in hostapd_set_security_params()
1412 cipher = bss->default_wep_key_len >= 13 ? in hostapd_set_security_params()
1414 } else if (full_config && bss->ssid.wep.keys_set) { in hostapd_set_security_params()
1415 if (bss->ssid.wep.len[0] >= 13) in hostapd_set_security_params()
1421 bss->wpa_group = cipher; in hostapd_set_security_params()
1422 bss->wpa_pairwise = cipher; in hostapd_set_security_params()
1423 bss->rsn_pairwise = cipher; in hostapd_set_security_params()
1425 bss->wpa_key_mgmt = WPA_KEY_MGMT_IEEE8021X_NO_WPA; in hostapd_set_security_params()
1427 } else if (bss->ssid.wep.keys_set) { in hostapd_set_security_params()
1429 if (bss->ssid.wep.len[0] >= 13) in hostapd_set_security_params()
1431 bss->ssid.security_policy = SECURITY_STATIC_WEP; in hostapd_set_security_params()
1432 bss->wpa_group = cipher; in hostapd_set_security_params()
1433 bss->wpa_pairwise = cipher; in hostapd_set_security_params()
1434 bss->rsn_pairwise = cipher; in hostapd_set_security_params()
1436 bss->wpa_key_mgmt = WPA_KEY_MGMT_NONE; in hostapd_set_security_params()
1438 } else if (bss->osen) { in hostapd_set_security_params()
1439 bss->ssid.security_policy = SECURITY_OSEN; in hostapd_set_security_params()
1440 bss->wpa_group = WPA_CIPHER_CCMP; in hostapd_set_security_params()
1441 bss->wpa_pairwise = 0; in hostapd_set_security_params()
1442 bss->rsn_pairwise = WPA_CIPHER_CCMP; in hostapd_set_security_params()
1444 bss->ssid.security_policy = SECURITY_PLAINTEXT; in hostapd_set_security_params()
1446 bss->wpa_group = WPA_CIPHER_NONE; in hostapd_set_security_params()
1447 bss->wpa_pairwise = WPA_CIPHER_NONE; in hostapd_set_security_params()
1448 bss->rsn_pairwise = WPA_CIPHER_NONE; in hostapd_set_security_params()
1449 bss->wpa_key_mgmt = WPA_KEY_MGMT_NONE; in hostapd_set_security_params()