]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/wpa_supplicant_i.h
SAE: Testing option to ignore H2E requirement mismatch
[thirdparty/hostap.git] / wpa_supplicant / wpa_supplicant_i.h
index fa0770fa9581612da73eee7224e97d3471605f89..c34bd28525995fb932e90f534612a3cca7a80977 100644 (file)
@@ -614,6 +614,9 @@ struct wpa_supplicant {
        int eapol_received; /* number of EAPOL packets received after the
                             * previous association event */
 
+       u8 rsnxe[20];
+       size_t rsnxe_len;
+
        struct scard_data *scard;
        char imsi[20];
        int mnc_len;
@@ -700,6 +703,10 @@ struct wpa_supplicant {
 
        struct wpa_ssid_value *ssids_from_scan_req;
        unsigned int num_ssids_from_scan_req;
+       int *last_scan_freqs;
+       unsigned int num_last_scan_freqs;
+       unsigned int suitable_network;
+       unsigned int no_suitable_network;
 
        u64 drv_flags;
        unsigned int drv_enc;
@@ -752,6 +759,7 @@ struct wpa_supplicant {
        unsigned int connection_ht:1;
        unsigned int connection_vht:1;
        unsigned int connection_he:1;
+       unsigned int disable_mbo_oce:1;
 
        struct os_reltime last_mac_addr_change;
        int last_mac_addr_style;
@@ -802,7 +810,10 @@ struct wpa_supplicant {
                int sae_group_index;
                unsigned int sae_pmksa_caching:1;
                u16 seq_num;
-               struct external_auth ext_auth;
+               u8 ext_auth_bssid[ETH_ALEN];
+               u8 ext_auth_ssid[SSID_MAX_LEN];
+               size_t ext_auth_ssid_len;
+               int *sae_rejected_groups;
 #endif /* CONFIG_SAE */
        } sme;
 #endif /* CONFIG_SME */
@@ -821,6 +832,7 @@ struct wpa_supplicant {
        unsigned int mesh_if_created:1;
        unsigned int mesh_ht_enabled:1;
        unsigned int mesh_vht_enabled:1;
+       unsigned int mesh_he_enabled:1;
        struct wpa_driver_mesh_join_params *mesh_params;
 #ifdef CONFIG_PMKSA_CACHE_EXTERNAL
        /* struct external_pmksa_cache::list */
@@ -1105,6 +1117,7 @@ struct wpa_supplicant {
        unsigned int ignore_auth_resp:1;
        unsigned int ignore_assoc_disallow:1;
        unsigned int testing_resend_assoc:1;
+       unsigned int ignore_sae_h2e_only:1;
        struct wpabuf *sae_commit_override;
        enum wpa_alg last_tk_alg;
        u8 last_tk_addr[ETH_ALEN];
@@ -1207,9 +1220,7 @@ struct wpa_supplicant {
        int last_auth_timeout_sec;
 
 #ifdef CONFIG_DPP
-       struct dl_list dpp_bootstrap; /* struct dpp_bootstrap_info */
-       struct dl_list dpp_configurator; /* struct dpp_configurator */
-       int dpp_init_done;
+       struct dpp_global *dpp;
        struct dpp_authentication *dpp_auth;
        struct wpa_radio_work *dpp_listen_work;
        unsigned int dpp_pending_listen_freq;
@@ -1236,6 +1247,11 @@ struct wpa_supplicant {
        unsigned int dpp_resp_wait_time;
        unsigned int dpp_resp_max_tries;
        unsigned int dpp_resp_retry_time;
+       u8 dpp_last_ssid[SSID_MAX_LEN];
+       size_t dpp_last_ssid_len;
+#ifdef CONFIG_DPP2
+       struct dpp_pfs *dpp_pfs;
+#endif /* CONFIG_DPP2 */
 #ifdef CONFIG_TESTING_OPTIONS
        char *dpp_config_obj_override;
        char *dpp_discovery_override;
@@ -1250,6 +1266,7 @@ struct wpa_supplicant {
        unsigned int ieee80211ac:1;
        unsigned int enabled_4addr_mode:1;
        unsigned int multi_bss_support:1;
+       unsigned int drv_authorized_port:1;
 };
 
 
@@ -1290,7 +1307,7 @@ struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s);
 const char * wpa_supplicant_get_eap_mode(struct wpa_supplicant *wpa_s);
 void wpa_supplicant_cancel_auth_timeout(struct wpa_supplicant *wpa_s);
 void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
-                                  int reason_code);
+                                  u16 reason_code);
 
 struct wpa_ssid * wpa_supplicant_add_network(struct wpa_supplicant *wpa_s);
 int wpa_supplicant_remove_network(struct wpa_supplicant *wpa_s, int id);
@@ -1385,6 +1402,8 @@ int wpas_mbo_ie(struct wpa_supplicant *wpa_s, u8 *buf, size_t len,
                int add_oce_capa);
 const u8 * mbo_attr_from_mbo_ie(const u8 *mbo_ie, enum mbo_attr_id attr);
 const u8 * wpas_mbo_get_bss_attr(struct wpa_bss *bss, enum mbo_attr_id attr);
+void wpas_mbo_check_pmf(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
+                       struct wpa_ssid *ssid);
 const u8 * mbo_get_attr_from_ies(const u8 *ies, size_t ies_len,
                                 enum mbo_attr_id attr);
 int wpas_mbo_update_non_pref_chan(struct wpa_supplicant *wpa_s,
@@ -1401,17 +1420,25 @@ struct wpabuf * mbo_build_anqp_buf(struct wpa_supplicant *wpa_s,
 void mbo_parse_rx_anqp_resp(struct wpa_supplicant *wpa_s,
                            struct wpa_bss *bss, const u8 *sa,
                            const u8 *data, size_t slen);
+void wpas_update_mbo_connect_params(struct wpa_supplicant *wpa_s);
 
 /* op_classes.c */
 enum chan_allowed {
        NOT_ALLOWED, NO_IR, ALLOWED
 };
 
-enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 channel,
-                                u8 bw);
+enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 op_class,
+                                u8 channel, u8 bw);
 size_t wpas_supp_op_class_ie(struct wpa_supplicant *wpa_s,
                             struct wpa_ssid *ssid,
                             int freq, u8 *pos, size_t len);
+int * wpas_supp_op_classes(struct wpa_supplicant *wpa_s);
+
+int wpas_enable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
+                                      unsigned int type, const u8 *addr,
+                                      const u8 *mask);
+int wpas_disable_mac_addr_randomization(struct wpa_supplicant *wpa_s,
+                                       unsigned int type);
 
 /**
  * wpa_supplicant_ctrl_iface_ctrl_rsp_handle - Handle a control response
@@ -1460,6 +1487,25 @@ static inline int network_is_persistent_group(struct wpa_ssid *ssid)
        return ssid->disabled == 2 && ssid->p2p_persistent_group;
 }
 
+
+static inline int wpas_mode_to_ieee80211_mode(enum wpas_mode mode)
+{
+       switch (mode) {
+       default:
+       case WPAS_MODE_INFRA:
+               return IEEE80211_MODE_INFRA;
+       case WPAS_MODE_IBSS:
+               return IEEE80211_MODE_IBSS;
+       case WPAS_MODE_AP:
+       case WPAS_MODE_P2P_GO:
+       case WPAS_MODE_P2P_GROUP_FORMATION:
+               return IEEE80211_MODE_AP;
+       case WPAS_MODE_MESH:
+               return IEEE80211_MODE_MESH;
+       }
+}
+
+
 int wpas_network_disabled(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);
 int wpas_get_ssid_pmf(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid);