1 /* 2 * WPA Supplicant / Network configuration structures 3 * Copyright (c) 2003-2013, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef CONFIG_SSID_H 10 #define CONFIG_SSID_H 11 12 #include "common/defs.h" 13 #include "utils/list.h" 14 #include "eap_peer/eap_config.h" 15 16 17 #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1) 18 #define DEFAULT_EAPOL_FLAGS (EAPOL_FLAG_REQUIRE_KEY_UNICAST | \ 19 EAPOL_FLAG_REQUIRE_KEY_BROADCAST) 20 #define DEFAULT_PROTO (WPA_PROTO_WPA | WPA_PROTO_RSN) 21 #define DEFAULT_KEY_MGMT (WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_IEEE8021X) 22 #ifdef CONFIG_NO_TKIP 23 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP) 24 #define DEFAULT_GROUP (WPA_CIPHER_CCMP) 25 #else /* CONFIG_NO_TKIP */ 26 #define DEFAULT_PAIRWISE (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 27 #define DEFAULT_GROUP (WPA_CIPHER_CCMP | WPA_CIPHER_TKIP) 28 #endif /* CONFIG_NO_TKIP */ 29 #define DEFAULT_FRAGMENT_SIZE 1398 30 31 #define DEFAULT_BG_SCAN_PERIOD -1 32 #define DEFAULT_MESH_MAX_RETRIES 2 33 #define DEFAULT_MESH_RETRY_TIMEOUT 40 34 #define DEFAULT_MESH_CONFIRM_TIMEOUT 40 35 #define DEFAULT_MESH_HOLDING_TIMEOUT 40 36 #define DEFAULT_MESH_RSSI_THRESHOLD 1 /* no change */ 37 #define DEFAULT_DISABLE_HT 0 38 #define DEFAULT_DISABLE_HT40 0 39 #define DEFAULT_DISABLE_SGI 0 40 #define DEFAULT_DISABLE_LDPC 0 41 #define DEFAULT_TX_STBC -1 /* no change */ 42 #define DEFAULT_RX_STBC -1 /* no change */ 43 #define DEFAULT_DISABLE_MAX_AMSDU -1 /* no change */ 44 #define DEFAULT_AMPDU_FACTOR -1 /* no change */ 45 #define DEFAULT_AMPDU_DENSITY -1 /* no change */ 46 #define DEFAULT_USER_SELECTED_SIM 1 47 #define DEFAULT_MAX_OPER_CHWIDTH -1 48 49 /* Consider global sae_pwe for SAE mechanism for PWE derivation */ 50 #define DEFAULT_SAE_PWE SAE_PWE_NOT_SET 51 52 struct psk_list_entry { 53 struct dl_list list; 54 u8 addr[ETH_ALEN]; 55 u8 psk[32]; 56 u8 p2p; 57 }; 58 59 enum wpas_mode { 60 WPAS_MODE_INFRA = 0, 61 WPAS_MODE_IBSS = 1, 62 WPAS_MODE_AP = 2, 63 WPAS_MODE_P2P_GO = 3, 64 WPAS_MODE_P2P_GROUP_FORMATION = 4, 65 WPAS_MODE_MESH = 5, 66 }; 67 68 enum sae_pk_mode { 69 SAE_PK_MODE_AUTOMATIC = 0, 70 SAE_PK_MODE_ONLY = 1, 71 SAE_PK_MODE_DISABLED = 2, 72 }; 73 74 enum wpas_mac_addr_style { 75 WPAS_MAC_ADDR_STYLE_NOT_SET = -1, 76 WPAS_MAC_ADDR_STYLE_PERMANENT = 0, 77 WPAS_MAC_ADDR_STYLE_RANDOM = 1, 78 WPAS_MAC_ADDR_STYLE_RANDOM_SAME_OUI = 2, 79 WPAS_MAC_ADDR_STYLE_DEDICATED_PER_ESS = 3, 80 }; 81 82 /** 83 * rsn_overriding - RSN overriding 84 * 85 * 0 = Disabled 86 * 1 = Enabled automatically if the driver indicates support 87 * 2 = Forced to be enabled even without driver capability indication 88 */ 89 enum wpas_rsn_overriding { 90 RSN_OVERRIDING_NOT_SET = -1, 91 RSN_OVERRIDING_DISABLED = 0, 92 RSN_OVERRIDING_AUTO = 1, 93 RSN_OVERRIDING_ENABLED = 2, 94 }; 95 96 /** 97 * struct wpa_ssid - Network configuration data 98 * 99 * This structure includes all the configuration variables for a network. This 100 * data is included in the per-interface configuration data as an element of 101 * the network list, struct wpa_config::ssid. Each network block in the 102 * configuration is mapped to a struct wpa_ssid instance. 103 */ 104 struct wpa_ssid { 105 /** 106 * next - Next network in global list 107 * 108 * This pointer can be used to iterate over all networks. The head of 109 * this list is stored in the ssid field of struct wpa_config. 110 */ 111 struct wpa_ssid *next; 112 113 /** 114 * pnext - Next network in per-priority list 115 * 116 * This pointer can be used to iterate over all networks in the same 117 * priority class. The heads of these list are stored in the pssid 118 * fields of struct wpa_config. 119 */ 120 struct wpa_ssid *pnext; 121 122 /** 123 * id - Unique id for the network 124 * 125 * This identifier is used as a unique identifier for each network 126 * block when using the control interface. Each network is allocated an 127 * id when it is being created, either when reading the configuration 128 * file or when a new network is added through the control interface. 129 */ 130 int id; 131 132 /** 133 * ro - Whether a network is declared as read-only 134 * 135 * Every network which is defined in a config file that is passed to 136 * wpa_supplicant using the -I option will be marked as read-only 137 * using this flag. It has the effect that it won't be written to 138 * /etc/wpa_supplicant.conf (from -c argument) if, e.g., wpa_gui tells 139 * the daemon to save all changed configs. 140 * 141 * This is necessary because networks from /etc/wpa_supplicant.conf 142 * have a higher priority and changes from an alternative file would be 143 * silently overwritten without this. 144 */ 145 bool ro; 146 147 /** 148 * priority - Priority group 149 * 150 * By default, all networks will get same priority group (0). If some 151 * of the networks are more desirable, this field can be used to change 152 * the order in which wpa_supplicant goes through the networks when 153 * selecting a BSS. The priority groups will be iterated in decreasing 154 * priority (i.e., the larger the priority value, the sooner the 155 * network is matched against the scan results). Within each priority 156 * group, networks will be selected based on security policy, signal 157 * strength, etc. 158 * 159 * Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are 160 * not using this priority to select the order for scanning. Instead, 161 * they try the networks in the order that used in the configuration 162 * file. 163 */ 164 int priority; 165 166 /** 167 * ssid - Service set identifier (network name) 168 * 169 * This is the SSID for the network. For wireless interfaces, this is 170 * used to select which network will be used. If set to %NULL (or 171 * ssid_len=0), any SSID can be used. For wired interfaces, this must 172 * be set to %NULL. Note: SSID may contain any characters, even nul 173 * (ASCII 0) and as such, this should not be assumed to be a nul 174 * terminated string. ssid_len defines how many characters are valid 175 * and the ssid field is not guaranteed to be nul terminated. 176 */ 177 u8 *ssid; 178 179 /** 180 * ssid_len - Length of the SSID 181 */ 182 size_t ssid_len; 183 184 /** 185 * bssid - BSSID 186 * 187 * If set, this network block is used only when associating with the AP 188 * using the configured BSSID 189 * 190 * If this is a persistent P2P group (disabled == 2), this is the GO 191 * Device Address. 192 */ 193 u8 bssid[ETH_ALEN]; 194 195 /** 196 * bssid_ignore - List of inacceptable BSSIDs 197 */ 198 u8 *bssid_ignore; 199 size_t num_bssid_ignore; 200 201 /** 202 * bssid_accept - List of acceptable BSSIDs 203 */ 204 u8 *bssid_accept; 205 size_t num_bssid_accept; 206 207 /** 208 * bssid_set - Whether BSSID is configured for this network 209 */ 210 int bssid_set; 211 212 /** 213 * bssid_hint - BSSID hint 214 * 215 * If set, this is configured to the driver as a preferred initial BSSID 216 * while connecting to this network. 217 */ 218 u8 bssid_hint[ETH_ALEN]; 219 220 /** 221 * bssid_hint_set - Whether BSSID hint is configured for this network 222 */ 223 int bssid_hint_set; 224 225 /** 226 * go_p2p_dev_addr - GO's P2P Device Address or all zeros if not set 227 */ 228 u8 go_p2p_dev_addr[ETH_ALEN]; 229 230 /** 231 * psk - WPA pre-shared key (256 bits) 232 */ 233 u8 psk[32]; 234 235 /** 236 * psk_set - Whether PSK field is configured 237 */ 238 int psk_set; 239 240 /** 241 * passphrase - WPA ASCII passphrase 242 * 243 * If this is set, psk will be generated using the SSID and passphrase 244 * configured for the network. ASCII passphrase must be between 8 and 245 * 63 characters (inclusive). 246 */ 247 char *passphrase; 248 249 /** 250 * sae_password - SAE password 251 * 252 * This parameter can be used to set a password for SAE. By default, the 253 * passphrase value is used if this separate parameter is not used, but 254 * passphrase follows the WPA-PSK constraints (8..63 characters) even 255 * though SAE passwords do not have such constraints. 256 */ 257 char *sae_password; 258 259 /** 260 * sae_password_id - SAE password identifier 261 * 262 * This parameter can be used to identify a specific SAE password. If 263 * not included, the default SAE password is used instead. 264 */ 265 char *sae_password_id; 266 267 struct sae_pt *pt; 268 269 /** 270 * ext_psk - PSK/passphrase name in external storage 271 * 272 * If this is set, PSK/passphrase will be fetched from external storage 273 * when requesting association with the network. 274 */ 275 char *ext_psk; 276 277 /** 278 * mem_only_psk - Whether to keep PSK/passphrase only in memory 279 * 280 * 0 = allow psk/passphrase to be stored to the configuration file 281 * 1 = do not store psk/passphrase to the configuration file 282 */ 283 int mem_only_psk; 284 285 /** 286 * pairwise_cipher - Bitfield of allowed pairwise ciphers, WPA_CIPHER_* 287 */ 288 int pairwise_cipher; 289 290 /** 291 * group_cipher - Bitfield of allowed group ciphers, WPA_CIPHER_* 292 */ 293 int group_cipher; 294 295 /** 296 * group_mgmt_cipher - Bitfield of allowed group management ciphers 297 * 298 * This is a bitfield of WPA_CIPHER_AES_128_CMAC and WPA_CIPHER_BIP_* 299 * values. If 0, no constraint is used for the cipher, i.e., whatever 300 * the AP uses is accepted. 301 */ 302 int group_mgmt_cipher; 303 304 /** 305 * key_mgmt - Bitfield of allowed key management protocols 306 * 307 * WPA_KEY_MGMT_* 308 */ 309 int key_mgmt; 310 311 /** 312 * bg_scan_period - Background scan period in seconds, 0 to disable, or 313 * -1 to indicate no change to default driver configuration 314 */ 315 int bg_scan_period; 316 317 /** 318 * proto - Bitfield of allowed protocols, WPA_PROTO_* 319 */ 320 int proto; 321 322 /** 323 * auth_alg - Bitfield of allowed authentication algorithms 324 * 325 * WPA_AUTH_ALG_* 326 */ 327 int auth_alg; 328 329 /** 330 * scan_ssid - Scan this SSID with Probe Requests 331 * 332 * scan_ssid can be used to scan for APs using hidden SSIDs. 333 * Note: Many drivers do not support this. ap_mode=2 can be used with 334 * such drivers to use hidden SSIDs. Note2: Most nl80211-based drivers 335 * do support scan_ssid=1 and that should be used with them instead of 336 * ap_scan=2. 337 */ 338 int scan_ssid; 339 340 #ifdef IEEE8021X_EAPOL 341 #define EAPOL_FLAG_REQUIRE_KEY_UNICAST BIT(0) 342 #define EAPOL_FLAG_REQUIRE_KEY_BROADCAST BIT(1) 343 /** 344 * eapol_flags - Bit field of IEEE 802.1X/EAPOL options (EAPOL_FLAG_*) 345 */ 346 int eapol_flags; 347 348 /** 349 * eap - EAP peer configuration for this network 350 */ 351 struct eap_peer_config eap; 352 #endif /* IEEE8021X_EAPOL */ 353 354 #ifdef CONFIG_WEP 355 #define NUM_WEP_KEYS 4 356 #define MAX_WEP_KEY_LEN 16 357 /** 358 * wep_key - WEP keys 359 */ 360 u8 wep_key[NUM_WEP_KEYS][MAX_WEP_KEY_LEN]; 361 362 /** 363 * wep_key_len - WEP key lengths 364 */ 365 size_t wep_key_len[NUM_WEP_KEYS]; 366 367 /** 368 * wep_tx_keyidx - Default key index for TX frames using WEP 369 */ 370 int wep_tx_keyidx; 371 #endif /* CONFIG_WEP */ 372 373 /** 374 * proactive_key_caching - Enable proactive key caching 375 * 376 * This field can be used to enable proactive key caching which is also 377 * known as opportunistic PMKSA caching for WPA2. This is disabled (0) 378 * by default unless default value is changed with the global okc=1 379 * parameter. Enable by setting this to 1. 380 * 381 * Proactive key caching is used to make supplicant assume that the APs 382 * are using the same PMK and generate PMKSA cache entries without 383 * doing RSN pre-authentication. This requires support from the AP side 384 * and is normally used with wireless switches that co-locate the 385 * authenticator. 386 * 387 * Internally, special value -1 is used to indicate that the parameter 388 * was not specified in the configuration (i.e., default behavior is 389 * followed). 390 */ 391 int proactive_key_caching; 392 393 /** 394 * mixed_cell - Whether mixed cells are allowed 395 * 396 * This option can be used to configure whether so called mixed cells, 397 * i.e., networks that use both plaintext and encryption in the same 398 * SSID, are allowed. This is disabled (0) by default. Enable by 399 * setting this to 1. 400 */ 401 int mixed_cell; 402 403 #ifdef IEEE8021X_EAPOL 404 405 /** 406 * leap - Number of EAP methods using LEAP 407 * 408 * This field should be set to 1 if LEAP is enabled. This is used to 409 * select IEEE 802.11 authentication algorithm. 410 */ 411 int leap; 412 413 /** 414 * non_leap - Number of EAP methods not using LEAP 415 * 416 * This field should be set to >0 if any EAP method other than LEAP is 417 * enabled. This is used to select IEEE 802.11 authentication 418 * algorithm. 419 */ 420 int non_leap; 421 422 /** 423 * eap_workaround - EAP workarounds enabled 424 * 425 * wpa_supplicant supports number of "EAP workarounds" to work around 426 * interoperability issues with incorrectly behaving authentication 427 * servers. This is recommended to be enabled by default because some 428 * of the issues are present in large number of authentication servers. 429 * 430 * Strict EAP conformance mode can be configured by disabling 431 * workarounds with eap_workaround = 0. 432 */ 433 unsigned int eap_workaround; 434 435 #endif /* IEEE8021X_EAPOL */ 436 437 /** 438 * mode - IEEE 802.11 operation mode (Infrastucture/IBSS) 439 * 440 * 0 = infrastructure (Managed) mode, i.e., associate with an AP. 441 * 442 * 1 = IBSS (ad-hoc, peer-to-peer) 443 * 444 * 2 = AP (access point) 445 * 446 * 3 = P2P Group Owner (can be set in the configuration file) 447 * 448 * 4 = P2P Group Formation (used internally; not in configuration 449 * files) 450 * 451 * 5 = Mesh 452 * 453 * Note: IBSS can only be used with key_mgmt NONE (plaintext and static 454 * WEP) and WPA-PSK (with proto=RSN). In addition, key_mgmt=WPA-NONE 455 * (fixed group key TKIP/CCMP) is available for backwards compatibility, 456 * but its use is deprecated. WPA-None requires following network block 457 * options: proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or 458 * CCMP, but not both), and psk must also be set (either directly or 459 * using ASCII passphrase). 460 */ 461 enum wpas_mode mode; 462 463 /** 464 * pbss - Whether to use PBSS. Relevant to DMG networks only. 465 * 0 = do not use PBSS 466 * 1 = use PBSS 467 * 2 = don't care (not allowed in AP mode) 468 * Used together with mode configuration. When mode is AP, it 469 * means to start a PCP instead of a regular AP. When mode is INFRA it 470 * means connect to a PCP instead of AP. In this mode you can also 471 * specify 2 (don't care) meaning connect to either AP or PCP. 472 * P2P_GO and P2P_GROUP_FORMATION modes must use PBSS in DMG network. 473 */ 474 int pbss; 475 476 /** 477 * disabled - Whether this network is currently disabled 478 * 479 * 0 = this network can be used (default). 480 * 1 = this network block is disabled (can be enabled through 481 * ctrl_iface, e.g., with wpa_cli or wpa_gui). 482 * 2 = this network block includes parameters for a persistent P2P 483 * group (can be used with P2P ctrl_iface commands) 484 */ 485 int disabled; 486 487 /** 488 * disabled_for_connect - Whether this network was temporarily disabled 489 * 490 * This flag is used to reenable all the temporarily disabled networks 491 * after either the success or failure of a WPS connection. 492 */ 493 int disabled_for_connect; 494 495 /** 496 * id_str - Network identifier string for external scripts 497 * 498 * This value is passed to external ctrl_iface monitors in 499 * WPA_EVENT_CONNECTED event and wpa_cli sets this as WPA_ID_STR 500 * environment variable for action scripts. 501 */ 502 char *id_str; 503 504 /** 505 * ieee80211w - Whether management frame protection is enabled 506 * 507 * This value is used to configure policy for management frame 508 * protection (IEEE 802.11w). 0 = disabled, 1 = optional, 2 = required. 509 * This is disabled by default unless the default value has been changed 510 * with the global pmf=1/2 parameter. 511 * 512 * Internally, special value 3 is used to indicate that the parameter 513 * was not specified in the configuration (i.e., default behavior is 514 * followed). 515 */ 516 enum mfp_options ieee80211w; 517 518 #ifdef CONFIG_OCV 519 /** 520 * ocv - Enable/disable operating channel validation 521 * 522 * If this parameter is set to 1, stations will exchange OCI element 523 * to cryptographically verify the operating channel. Setting this 524 * parameter to 0 disables this option. Default value: 0. 525 */ 526 int ocv; 527 #endif /* CONFIG_OCV */ 528 529 /** 530 * frequency - Channel frequency in megahertz (MHz) for IBSS 531 * 532 * This value is used to configure the initial channel for IBSS (adhoc) 533 * networks, e.g., 2412 = IEEE 802.11b/g channel 1. It is ignored in 534 * the infrastructure mode. In addition, this value is only used by the 535 * station that creates the IBSS. If an IBSS network with the 536 * configured SSID is already present, the frequency of the network 537 * will be used instead of this configured value. 538 */ 539 int frequency; 540 541 /** 542 * enable_edmg - Enable EDMG feature in STA/AP mode 543 * 544 * This flag is used for enabling the EDMG capability in STA/AP mode. 545 */ 546 int enable_edmg; 547 548 /** 549 * edmg_channel - EDMG channel number 550 * 551 * This value is used to configure the EDMG channel bonding feature. 552 * In AP mode it defines the EDMG channel to start the AP on. 553 * in STA mode it defines the EDMG channel to use for connection 554 * (if supported by AP). 555 */ 556 u8 edmg_channel; 557 558 /** 559 * fixed_freq - Use fixed frequency for IBSS 560 */ 561 int fixed_freq; 562 563 #ifdef CONFIG_ACS 564 /** 565 * ACS - Automatic Channel Selection for AP mode 566 * 567 * If present, it will be handled together with frequency. 568 * frequency will be used to determine hardware mode only, when it is 569 * used for both hardware mode and channel when used alone. This will 570 * force the channel to be set to 0, thus enabling ACS. 571 */ 572 int acs; 573 #endif /* CONFIG_ACS */ 574 575 /** 576 * mesh_basic_rates - BSS Basic rate set for mesh network 577 * 578 */ 579 int *mesh_basic_rates; 580 581 /** 582 * Mesh network plink parameters 583 */ 584 int dot11MeshMaxRetries; 585 int dot11MeshRetryTimeout; /* msec */ 586 int dot11MeshConfirmTimeout; /* msec */ 587 int dot11MeshHoldingTimeout; /* msec */ 588 589 /** 590 * Mesh network layer-2 forwarding (dot11MeshForwarding) 591 */ 592 int mesh_fwding; 593 594 int ht; 595 int ht40; 596 597 int vht; 598 599 int he; 600 601 int eht; 602 603 enum oper_chan_width max_oper_chwidth; 604 605 unsigned int vht_center_freq1; 606 unsigned int vht_center_freq2; 607 608 /** 609 * wpa_ptk_rekey - Maximum lifetime for PTK in seconds 610 * 611 * This value can be used to enforce rekeying of PTK to mitigate some 612 * attacks against TKIP deficiencies. 613 */ 614 int wpa_ptk_rekey; 615 616 /** wpa_deny_ptk0_rekey - Control PTK0 rekeying 617 * 618 * Rekeying a pairwise key using only keyid 0 (PTK0 rekey) has many 619 * broken implementations and should be avoided when using or 620 * interacting with one. 621 * 622 * 0 = always rekey when configured/instructed 623 * 1 = only rekey when the local driver is explicitly indicating it can 624 * perform this operation without issues 625 * 2 = never allow PTK0 rekeys 626 */ 627 enum ptk0_rekey_handling wpa_deny_ptk0_rekey; 628 629 /** 630 * group_rekey - Group rekeying time in seconds 631 * 632 * This value, if non-zero, is used as the dot11RSNAConfigGroupRekeyTime 633 * parameter when operating in Authenticator role in IBSS. 634 */ 635 int group_rekey; 636 637 /** 638 * scan_freq - Array of frequencies to scan or %NULL for all 639 * 640 * This is an optional zero-terminated array of frequencies in 641 * megahertz (MHz) to include in scan requests when searching for this 642 * network. This can be used to speed up scanning when the network is 643 * known to not use all possible channels. 644 */ 645 int *scan_freq; 646 647 /** 648 * bgscan - Background scan and roaming parameters or %NULL if none 649 * 650 * This is an optional set of parameters for background scanning and 651 * roaming within a network (ESS) in following format: 652 * <bgscan module name>:<module parameters> 653 */ 654 char *bgscan; 655 656 /** 657 * ignore_broadcast_ssid - Hide SSID in AP mode 658 * 659 * Send empty SSID in beacons and ignore probe request frames that do 660 * not specify full SSID, i.e., require stations to know SSID. 661 * default: disabled (0) 662 * 1 = send empty (length=0) SSID in beacon and ignore probe request 663 * for broadcast SSID 664 * 2 = clear SSID (ASCII 0), but keep the original length (this may be 665 * required with some clients that do not support empty SSID) and 666 * ignore probe requests for broadcast SSID 667 */ 668 int ignore_broadcast_ssid; 669 670 /** 671 * freq_list - Array of allowed frequencies or %NULL for all 672 * 673 * This is an optional zero-terminated array of frequencies in 674 * megahertz (MHz) to allow for selecting the BSS. If set, scan results 675 * that do not match any of the specified frequencies are not 676 * considered when selecting a BSS. 677 */ 678 int *freq_list; 679 680 /** 681 * p2p_client_list - List of P2P Clients in a persistent group (GO) 682 * 683 * This is a list of P2P Clients (P2P Device Address) that have joined 684 * the persistent group. This is maintained on the GO for persistent 685 * group entries (disabled == 2). 686 */ 687 u8 *p2p_client_list; 688 689 /** 690 * num_p2p_clients - Number of entries in p2p_client_list 691 */ 692 size_t num_p2p_clients; 693 694 #ifndef P2P_MAX_STORED_CLIENTS 695 #define P2P_MAX_STORED_CLIENTS 100 696 #endif /* P2P_MAX_STORED_CLIENTS */ 697 698 /** 699 * psk_list - Per-client PSKs (struct psk_list_entry) 700 */ 701 struct dl_list psk_list; 702 703 /** 704 * p2p_group - Network generated as a P2P group (used internally) 705 */ 706 int p2p_group; 707 708 /** 709 * p2p_persistent_group - Whether this is a persistent group 710 */ 711 int p2p_persistent_group; 712 713 /** 714 * temporary - Whether this network is temporary and not to be saved 715 */ 716 int temporary; 717 718 /** 719 * export_keys - Whether keys may be exported 720 * 721 * This attribute will be set when keys are determined through 722 * WPS or similar so that they may be exported. 723 */ 724 int export_keys; 725 726 #ifdef CONFIG_HT_OVERRIDES 727 /** 728 * disable_ht - Disable HT (IEEE 802.11n) for this network 729 * 730 * By default, use it if it is available, but this can be configured 731 * to 1 to have it disabled. 732 */ 733 int disable_ht; 734 735 /** 736 * disable_ht40 - Disable HT40 for this network 737 * 738 * By default, use it if it is available, but this can be configured 739 * to 1 to have it disabled. 740 */ 741 int disable_ht40; 742 743 /** 744 * disable_sgi - Disable SGI (Short Guard Interval) for this network 745 * 746 * By default, use it if it is available, but this can be configured 747 * to 1 to have it disabled. 748 */ 749 int disable_sgi; 750 751 /** 752 * disable_ldpc - Disable LDPC for this network 753 * 754 * By default, use it if it is available, but this can be configured 755 * to 1 to have it disabled. 756 */ 757 int disable_ldpc; 758 759 /** 760 * ht40_intolerant - Indicate 40 MHz intolerant for this network 761 */ 762 int ht40_intolerant; 763 764 /** 765 * disable_max_amsdu - Disable MAX A-MSDU 766 * 767 * A-MDSU will be 3839 bytes when disabled, or 7935 768 * when enabled (assuming it is otherwise supported) 769 * -1 (default) means do not apply any settings to the kernel. 770 */ 771 int disable_max_amsdu; 772 773 /** 774 * ampdu_factor - Maximum A-MPDU Length Exponent 775 * 776 * Value: 0-3, see 7.3.2.56.3 in IEEE Std 802.11n-2009. 777 */ 778 int ampdu_factor; 779 780 /** 781 * ampdu_density - Minimum A-MPDU Start Spacing 782 * 783 * Value: 0-7, see 7.3.2.56.3 in IEEE Std 802.11n-2009. 784 */ 785 int ampdu_density; 786 787 /** 788 * ht_mcs - Allowed HT-MCS rates, in ASCII hex: ffff0000... 789 * 790 * By default (empty string): Use whatever the OS has configured. 791 */ 792 char *ht_mcs; 793 794 /** 795 * tx_stbc - Indicate STBC support for TX streams 796 * 797 * Value: -1..1, by default (-1): use whatever the OS or card has 798 * configured. See IEEE Std 802.11-2016, 9.4.2.56.2. 799 */ 800 int tx_stbc; 801 802 /** 803 * rx_stbc - Indicate STBC support for RX streams 804 * 805 * Value: -1..3, by default (-1): use whatever the OS or card has 806 * configured. See IEEE Std 802.11-2016, 9.4.2.56.2. 807 */ 808 int rx_stbc; 809 #endif /* CONFIG_HT_OVERRIDES */ 810 811 #ifdef CONFIG_VHT_OVERRIDES 812 /** 813 * disable_vht - Disable VHT (IEEE 802.11ac) for this network 814 * 815 * By default, use it if it is available, but this can be configured 816 * to 1 to have it disabled. 817 */ 818 int disable_vht; 819 820 /** 821 * vht_capa - VHT capabilities to use 822 */ 823 unsigned int vht_capa; 824 825 /** 826 * vht_capa_mask - mask for VHT capabilities 827 */ 828 unsigned int vht_capa_mask; 829 830 int vht_rx_mcs_nss_1, vht_rx_mcs_nss_2, 831 vht_rx_mcs_nss_3, vht_rx_mcs_nss_4, 832 vht_rx_mcs_nss_5, vht_rx_mcs_nss_6, 833 vht_rx_mcs_nss_7, vht_rx_mcs_nss_8; 834 int vht_tx_mcs_nss_1, vht_tx_mcs_nss_2, 835 vht_tx_mcs_nss_3, vht_tx_mcs_nss_4, 836 vht_tx_mcs_nss_5, vht_tx_mcs_nss_6, 837 vht_tx_mcs_nss_7, vht_tx_mcs_nss_8; 838 #endif /* CONFIG_VHT_OVERRIDES */ 839 840 #ifdef CONFIG_HE_OVERRIDES 841 /** 842 * disable_he - Disable HE (IEEE 802.11ax) for this network 843 * 844 * By default, use it if it is available, but this can be configured 845 * to 1 to have it disabled. 846 */ 847 int disable_he; 848 #endif /* CONFIG_HE_OVERRIDES */ 849 850 /** 851 * ap_max_inactivity - Timeout in seconds to detect STA's inactivity 852 * 853 * This timeout value is used in AP mode to clean up inactive stations. 854 * By default: 300 seconds. 855 */ 856 int ap_max_inactivity; 857 858 /** 859 * dtim_period - DTIM period in Beacon intervals 860 * By default: 2 861 */ 862 int dtim_period; 863 864 /** 865 * beacon_int - Beacon interval (default: 100 TU) 866 */ 867 int beacon_int; 868 869 /** 870 * auth_failures - Number of consecutive authentication failures 871 */ 872 unsigned int auth_failures; 873 874 /** 875 * disabled_until - Network block disabled until this time if non-zero 876 */ 877 struct os_reltime disabled_until; 878 879 /** 880 * disabled_due_to - BSSID of the disabling failure 881 * 882 * This identifies the BSS that failed the connection attempt that 883 * resulted in the network being temporarily disabled. 884 */ 885 u8 disabled_due_to[ETH_ALEN]; 886 887 /** 888 * parent_cred - Pointer to parent wpa_cred entry 889 * 890 * This pointer can be used to delete temporary networks when a wpa_cred 891 * that was used to create them is removed. This pointer should not be 892 * dereferences since it may not be updated in all cases. 893 */ 894 void *parent_cred; 895 896 #ifdef CONFIG_MACSEC 897 /** 898 * macsec_policy - Determines the policy for MACsec secure session 899 * 900 * 0: MACsec not in use (default) 901 * 1: MACsec enabled - Should secure, accept key server's advice to 902 * determine whether to use a secure session or not. 903 */ 904 int macsec_policy; 905 906 /** 907 * macsec_integ_only - Determines how MACsec are transmitted 908 * 909 * This setting applies only when MACsec is in use, i.e., 910 * - macsec_policy is enabled 911 * - the key server has decided to enable MACsec 912 * 913 * 0: Encrypt traffic (default) 914 * 1: Integrity only 915 */ 916 int macsec_integ_only; 917 918 /** 919 * macsec_replay_protect - Enable MACsec replay protection 920 * 921 * This setting applies only when MACsec is in use, i.e., 922 * - macsec_policy is enabled 923 * - the key server has decided to enable MACsec 924 * 925 * 0: Replay protection disabled (default) 926 * 1: Replay protection enabled 927 */ 928 int macsec_replay_protect; 929 930 /** 931 * macsec_replay_window - MACsec replay protection window 932 * 933 * A window in which replay is tolerated, to allow receipt of frames 934 * that have been misordered by the network. 935 * 936 * This setting applies only when MACsec replay protection active, i.e., 937 * - macsec_replay_protect is enabled 938 * - the key server has decided to enable MACsec 939 * 940 * 0: No replay window, strict check (default) 941 * 1..2^32-1: number of packets that could be misordered 942 */ 943 u32 macsec_replay_window; 944 945 /** 946 * macsec_offload - Enable MACsec hardware offload 947 * 948 * This setting applies only when MACsec is in use, i.e., 949 * - the key server has decided to enable MACsec 950 * 951 * 0 = MACSEC_OFFLOAD_OFF (default) 952 * 1 = MACSEC_OFFLOAD_PHY 953 * 2 = MACSEC_OFFLOAD_MAC 954 */ 955 int macsec_offload; 956 957 /** 958 * macsec_port - MACsec port (in SCI) 959 * 960 * Port component of the SCI. 961 * 962 * Range: 1-65534 (default: 1) 963 */ 964 int macsec_port; 965 966 /** 967 * mka_priority - Priority of MKA Actor 968 * 969 * Range: 0-255 (default: 255) 970 */ 971 int mka_priority; 972 973 /** 974 * macsec_csindex - Cipher suite index for MACsec 975 * 976 * Range: 0-1 (default: 0) 977 */ 978 int macsec_csindex; 979 980 /** 981 * mka_ckn - MKA pre-shared CKN 982 */ 983 #define MACSEC_CKN_MAX_LEN 32 984 size_t mka_ckn_len; 985 u8 mka_ckn[MACSEC_CKN_MAX_LEN]; 986 987 /** 988 * mka_cak - MKA pre-shared CAK 989 */ 990 #define MACSEC_CAK_MAX_LEN 32 991 size_t mka_cak_len; 992 u8 mka_cak[MACSEC_CAK_MAX_LEN]; 993 994 #define MKA_PSK_SET_CKN BIT(0) 995 #define MKA_PSK_SET_CAK BIT(1) 996 #define MKA_PSK_SET (MKA_PSK_SET_CKN | MKA_PSK_SET_CAK) 997 /** 998 * mka_psk_set - Whether mka_ckn and mka_cak are set 999 */ 1000 u8 mka_psk_set; 1001 #endif /* CONFIG_MACSEC */ 1002 1003 #ifdef CONFIG_HS20 1004 int update_identifier; 1005 1006 /** 1007 * roaming_consortium_selection - Roaming Consortium Selection 1008 * 1009 * The matching Roaming Consortium OI that was used to generate this 1010 * network profile. 1011 */ 1012 u8 *roaming_consortium_selection; 1013 1014 /** 1015 * roaming_consortium_selection_len - roaming_consortium_selection len 1016 */ 1017 size_t roaming_consortium_selection_len; 1018 #endif /* CONFIG_HS20 */ 1019 1020 unsigned int wps_run; 1021 1022 /** 1023 * mac_addr - MAC address policy 1024 * 1025 * 0 = use permanent MAC address 1026 * 1 = use random MAC address for each ESS connection 1027 * 2 = like 1, but maintain OUI (with local admin bit set) 1028 * 3 = use dedicated/pregenerated MAC address (see mac_value) 1029 * 1030 * Internally, special value -1 is used to indicate that the parameter 1031 * was not specified in the configuration (i.e., default behavior is 1032 * followed). 1033 */ 1034 enum wpas_mac_addr_style mac_addr; 1035 1036 /** 1037 * mac_value - Specific MAC address to be used 1038 * 1039 * When mac_addr policy is equal to 3 this is the value of the MAC 1040 * address that should be used. 1041 */ 1042 u8 mac_value[ETH_ALEN]; 1043 1044 /** 1045 * no_auto_peer - Do not automatically peer with compatible mesh peers 1046 * 1047 * When unset, the reception of a beacon from a another mesh peer in 1048 * this MBSS will trigger a peering attempt. 1049 */ 1050 int no_auto_peer; 1051 1052 /** 1053 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm) 1054 * 1055 * -255..-1 = threshold value in dBm 1056 * 0 = not using RSSI threshold 1057 * 1 = do not change driver default 1058 */ 1059 int mesh_rssi_threshold; 1060 1061 /** 1062 * wps_disabled - WPS disabled in AP mode 1063 * 1064 * 0 = WPS enabled and configured (default) 1065 * 1 = WPS disabled 1066 */ 1067 int wps_disabled; 1068 1069 /** 1070 * fils_dh_group - FILS DH Group 1071 * 1072 * 0 = PFS disabled with FILS shared key authentication 1073 * 1-65535 DH Group to use for FILS PFS 1074 */ 1075 int fils_dh_group; 1076 1077 /** 1078 * dpp_connector - DPP Connector (signedConnector as string) 1079 */ 1080 char *dpp_connector; 1081 1082 /** 1083 * dpp_netaccesskey - DPP netAccessKey (own private key) 1084 */ 1085 u8 *dpp_netaccesskey; 1086 1087 /** 1088 * dpp_netaccesskey_len - DPP netAccessKey length in octets 1089 */ 1090 size_t dpp_netaccesskey_len; 1091 1092 /** 1093 * net_access_key_expiry - DPP netAccessKey expiry in UNIX time stamp 1094 * 1095 * 0 indicates no expiration. 1096 */ 1097 unsigned int dpp_netaccesskey_expiry; 1098 1099 /** 1100 * dpp_csign - C-sign-key (Configurator public key) 1101 */ 1102 u8 *dpp_csign; 1103 1104 /** 1105 * dpp_csign_len - C-sign-key length in octets 1106 */ 1107 size_t dpp_csign_len; 1108 1109 /** 1110 * dpp_pp_key - ppKey (Configurator privacy protection public key) 1111 */ 1112 u8 *dpp_pp_key; 1113 1114 /** 1115 * dpp_pp_key_len - ppKey length in octets 1116 */ 1117 size_t dpp_pp_key_len; 1118 1119 /** 1120 * dpp_pfs - DPP PFS 1121 * 0: allow PFS to be used or not used 1122 * 1: require PFS to be used (note: not compatible with DPP R1) 1123 * 2: do not allow PFS to be used 1124 */ 1125 int dpp_pfs; 1126 1127 /** 1128 * dpp_pfs_fallback - DPP PFS fallback selection 1129 * 1130 * This is an internally used variable (i.e., not used in external 1131 * configuration) to track state of the DPP PFS fallback mechanism. 1132 */ 1133 int dpp_pfs_fallback; 1134 1135 /** 1136 * dpp_connector_privacy - Network introduction type 1137 * 0: unprotected variant from DPP R1 1138 * 1: privacy protecting (station Connector encrypted) variant from 1139 * DPP R3 1140 */ 1141 int dpp_connector_privacy; 1142 1143 /** 1144 * owe_group - OWE DH Group 1145 * 1146 * 0 = use default (19) first and then try all supported groups one by 1147 * one if AP rejects the selected group 1148 * 1-65535 DH Group to use for OWE 1149 * 1150 * Groups 19 (NIST P-256), 20 (NIST P-384), and 21 (NIST P-521) are 1151 * currently supported. 1152 */ 1153 int owe_group; 1154 1155 /** 1156 * owe_only - OWE-only mode (disable transition mode) 1157 * 1158 * 0 = enable transition mode (allow connection to either OWE or open 1159 * BSS) 1160 * 1 = disable transition mode (allow connection only with OWE) 1161 */ 1162 int owe_only; 1163 1164 /** 1165 * owe_ptk_workaround - OWE PTK derivation workaround 1166 * 1167 * Initial OWE implementation used SHA256 when deriving the PTK for all 1168 * OWE groups. This was supposed to change to SHA384 for group 20 and 1169 * SHA512 for group 21. This parameter can be used to enable older 1170 * behavior mainly for testing purposes. There is no impact to group 19 1171 * behavior, but if enabled, this will make group 20 and 21 cases use 1172 * SHA256-based PTK derivation which will not work with the updated 1173 * OWE implementation on the AP side. 1174 */ 1175 int owe_ptk_workaround; 1176 1177 /** 1178 * owe_transition_bss_select_count - OWE transition BSS select count 1179 * 1180 * This is an internally used variable (i.e., not used in external 1181 * configuration) to track the number of selection attempts done for 1182 * OWE BSS in transition mode. This allows fallback to an open BSS if 1183 * the selection attempts for OWE BSS exceed the configured threshold. 1184 */ 1185 int owe_transition_bss_select_count; 1186 1187 /** 1188 * multi_ap_backhaul_sta - Multi-AP backhaul STA 1189 * 0 = normal (non-Multi-AP) station 1190 * 1 = Multi-AP backhaul station 1191 */ 1192 int multi_ap_backhaul_sta; 1193 1194 /** 1195 * ft_eap_pmksa_caching - Whether FT-EAP PMKSA caching is allowed 1196 * 0 = do not try to use PMKSA caching with FT-EAP 1197 * 1 = try to use PMKSA caching with FT-EAP 1198 * 1199 * This controls whether to try to use PMKSA caching with FT-EAP for the 1200 * FT initial mobility domain association. 1201 */ 1202 int ft_eap_pmksa_caching; 1203 1204 /** 1205 * multi_ap_profile - Supported Multi-AP profile 1206 */ 1207 int multi_ap_profile; 1208 1209 /** 1210 * beacon_prot - Whether Beacon protection is enabled 1211 * 1212 * This depends on management frame protection (ieee80211w) being 1213 * enabled. 1214 */ 1215 int beacon_prot; 1216 1217 /** 1218 * transition_disable - Transition Disable indication 1219 * The AP can notify authenticated stations to disable transition mode 1220 * in their network profiles when the network has completed transition 1221 * steps, i.e., once sufficiently large number of APs in the ESS have 1222 * been updated to support the more secure alternative. When this 1223 * indication is used, the stations are expected to automatically 1224 * disable transition mode and less secure security options. This 1225 * includes use of WEP, TKIP (including use of TKIP as the group 1226 * cipher), and connections without PMF. 1227 * Bitmap bits: 1228 * bit 0 (0x01): WPA3-Personal (i.e., disable WPA2-Personal = WPA-PSK 1229 * and only allow SAE to be used) 1230 * bit 1 (0x02): SAE-PK (disable SAE without use of SAE-PK) 1231 * bit 2 (0x04): WPA3-Enterprise (move to requiring PMF) 1232 * bit 3 (0x08): Enhanced Open (disable use of open network; require 1233 * OWE) 1234 */ 1235 u8 transition_disable; 1236 1237 /** 1238 * sae_pk - SAE-PK mode 1239 * 0 = automatic SAE/SAE-PK selection based on password; enable 1240 * transition mode (allow SAE authentication without SAE-PK) 1241 * 1 = SAE-PK only (disable transition mode; allow SAE authentication 1242 * only with SAE-PK) 1243 * 2 = disable SAE-PK (allow SAE authentication only without SAE-PK) 1244 */ 1245 enum sae_pk_mode sae_pk; 1246 1247 /** 1248 * was_recently_reconfigured - Whether this SSID config has been changed 1249 * recently 1250 * 1251 * This is an internally used variable, i.e., not used in external 1252 * configuration. 1253 */ 1254 bool was_recently_reconfigured; 1255 1256 /** 1257 * sae_pwe - SAE mechanism for PWE derivation 1258 * 1259 * Internally, special value 4 (DEFAULT_SAE_PWE) is used to indicate 1260 * that the parameter is not set and the global sae_pwe value needs to 1261 * be considered. 1262 * 1263 * 0 = hunting-and-pecking loop only 1264 * 1 = hash-to-element only 1265 * 2 = both hunting-and-pecking loop and hash-to-element enabled 1266 */ 1267 enum sae_pwe sae_pwe; 1268 1269 /** 1270 * disable_eht - Disable EHT (IEEE 802.11be) for this network 1271 * 1272 * By default, use it if it is available, but this can be configured 1273 * to 1 to have it disabled. 1274 */ 1275 int disable_eht; 1276 1277 /** 1278 * enable_4addr_mode - Set 4addr mode after association 1279 * 0 = Do not attempt to set 4addr mode 1280 * 1 = Try to set 4addr mode after association 1281 * 1282 * Linux requires that an interface is set to 4addr mode before it can 1283 * be added to a bridge. Set this to 1 for networks where you intent 1284 * to use the interface in a bridge. 1285 */ 1286 int enable_4addr_mode; 1287 1288 /** 1289 * max_idle - BSS max idle period to request 1290 * 1291 * If nonzero, request the specified number of 1000 TU (i.e., 1.024 s) 1292 * as the maximum idle period for the STA during association. 1293 */ 1294 int max_idle; 1295 1296 /** 1297 * ssid_protection - Whether to use SSID protection in 4-way handshake 1298 */ 1299 bool ssid_protection; 1300 1301 /** 1302 * rsn_overriding - RSN overriding (per-network override for the global 1303 * parameter with the same name) 1304 */ 1305 enum wpas_rsn_overriding rsn_overriding; 1306 }; 1307 1308 #endif /* CONFIG_SSID_H */ 1309