mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-21 11:22:50 +00:00
Some checks failed
Build OpenWrt/uCentral images / build (cig_wf186h) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf186w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf188n) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf189) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cig_wf196) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-a1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (cybertan_eww631-b1) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap102) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap104) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap105) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap111) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_eap112) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (edgecore_oap101e-6e) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_3) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4x_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xe) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi) (push) Has been cancelled
Build OpenWrt/uCentral images / build (hfcl_ion4xi_w) (push) Has been cancelled
Build OpenWrt/uCentral images / build (indio_um-305ax) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sercomm_ap72tip) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630c-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-211g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (sonicfi_rap630w-311g) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-id2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (udaya_a6-od2) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr5018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018) (push) Has been cancelled
Build OpenWrt/uCentral images / build (wallys_dr6018-v4) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax820) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_ax840) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap640) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap650) (push) Has been cancelled
Build OpenWrt/uCentral images / build (yuncore_fap655) (push) Has been cancelled
Build OpenWrt/uCentral images / trigger-testing (push) Has been cancelled
Build OpenWrt/uCentral images / create-x64_vm-ami (push) Has been cancelled
Signed-off-by: John Crispin <john@phrozen.org>
124 lines
3.9 KiB
Diff
124 lines
3.9 KiB
Diff
From 2f978b748c5f74fb8f9d3dfb9310d155a7ec1745 Mon Sep 17 00:00:00 2001
|
|
From: Yuvarani V <quic_yuvarani@quicinc.com>
|
|
Date: Fri, 1 Dec 2023 13:37:58 +0530
|
|
Subject: [PATCH] hostapd: add BMLE IE support in FT action frame
|
|
|
|
FT Response frame transmitted by the current associated AP as response to
|
|
the STA FT Request frame should contain the BMLE IE.
|
|
|
|
Signed-off-by: Karthik M <quic_karm@quicinc.com>
|
|
Signed-off-by: Yuvarani V <quic_yuvarani@quicinc.com>
|
|
---
|
|
src/ap/wpa_auth.h | 2 ++
|
|
src/ap/wpa_auth_ft.c | 32 ++++++++++++++++++++++++++++++--
|
|
src/ap/wpa_auth_glue.c | 16 ++++++++++++++++
|
|
3 files changed, 48 insertions(+), 2 deletions(-)
|
|
|
|
--- a/src/ap/wpa_auth.h
|
|
+++ b/src/ap/wpa_auth.h
|
|
@@ -385,6 +385,8 @@ struct wpa_auth_callbacks {
|
|
const u8 *data, size_t data_len);
|
|
int (*add_tspec)(void *ctx, const u8 *sta_addr, u8 *tspec_ie,
|
|
size_t tspec_ielen);
|
|
+ u8* (*add_bmle)(void *ctx, u8 *bmle_ie, u32 type, void *ml_data);
|
|
+ size_t (*add_bmle_len)(void *ctx, u32 type, void *ml_data);
|
|
#endif /* CONFIG_IEEE80211R_AP */
|
|
#ifdef CONFIG_MESH
|
|
int (*start_ampe)(void *ctx, const u8 *sta_addr);
|
|
--- a/src/ap/wpa_auth_ft.c
|
|
+++ b/src/ap/wpa_auth_ft.c
|
|
@@ -778,6 +778,30 @@ static int wpa_ft_add_tspec(struct wpa_a
|
|
}
|
|
|
|
|
|
+static u8 *wpa_ft_add_bmle(struct wpa_authenticator *wpa_auth,
|
|
+ u8 *bmle_ie, u32 type,
|
|
+ struct multi_link_data *ml_data)
|
|
+{
|
|
+ if (wpa_auth->cb->add_bmle == NULL) {
|
|
+ wpa_printf(MSG_DEBUG, "FT: add_bmle is not initialized");
|
|
+ return bmle_ie;
|
|
+ }
|
|
+ return wpa_auth->cb->add_bmle(wpa_auth->cb_ctx, bmle_ie, type,
|
|
+ ml_data);
|
|
+}
|
|
+
|
|
+static size_t wpa_ft_add_bmle_len(struct wpa_authenticator *wpa_auth,
|
|
+ u32 type,
|
|
+ struct multi_link_data *ml_data)
|
|
+{
|
|
+ if (wpa_auth->cb->add_bmle_len == NULL) {
|
|
+ wpa_printf(MSG_DEBUG, "FT: add_bmle_len is not initialized");
|
|
+ return 0;
|
|
+ }
|
|
+ return wpa_auth->cb->add_bmle_len(wpa_auth->cb_ctx, type, ml_data);
|
|
+}
|
|
+
|
|
+
|
|
#ifdef CONFIG_OCV
|
|
static int wpa_channel_info(struct wpa_authenticator *wpa_auth,
|
|
struct wpa_channel_info *ci)
|
|
@@ -3529,7 +3553,7 @@ static int wpa_ft_process_auth_req(struc
|
|
struct vlan_description vlan;
|
|
const u8 *identity, *radius_cui;
|
|
size_t identity_len = 0, radius_cui_len = 0;
|
|
- size_t pmk_r1_len, kdk_len, len;
|
|
+ size_t pmk_r1_len, kdk_len, len, bmle_len;
|
|
|
|
*resp_ies = NULL;
|
|
*resp_ies_len = 0;
|
|
@@ -3738,8 +3762,10 @@ pmk_r1_derived:
|
|
}
|
|
wpa_ft_set_session_timeout(sm->wpa_auth, wpa_auth_get_spa(sm), session_timeout);
|
|
|
|
+ bmle_len = wpa_ft_add_bmle_len(sm->wpa_auth, WLAN_FC_STYPE_AUTH, NULL);
|
|
+
|
|
buflen = 2 + sizeof(struct rsn_mdie) + 2 + sizeof(struct rsn_ftie) +
|
|
- 2 + FT_R1KH_ID_LEN + 200;
|
|
+ 2 + FT_R1KH_ID_LEN + bmle_len + 200;
|
|
*resp_ies = os_zalloc(buflen);
|
|
if (*resp_ies == NULL)
|
|
goto fail;
|
|
@@ -3765,6 +3791,8 @@ pmk_r1_derived:
|
|
goto fail;
|
|
pos += ret;
|
|
|
|
+ pos = wpa_ft_add_bmle(sm->wpa_auth, pos, WLAN_FC_STYPE_AUTH, NULL);
|
|
+
|
|
*resp_ies_len = pos - *resp_ies;
|
|
|
|
return WLAN_STATUS_SUCCESS;
|
|
--- a/src/ap/wpa_auth_glue.c
|
|
+++ b/src/ap/wpa_auth_glue.c
|
|
@@ -1417,6 +1417,21 @@ static int hostapd_wpa_auth_add_tspec(vo
|
|
}
|
|
|
|
|
|
+static u8 *hostapd_wpa_ft_add_bmle(void *ctx, u8 *bmle_ie, void *mle_data)
|
|
+{
|
|
+ struct hostapd_data *hapd = ctx;
|
|
+
|
|
+ return hostapd_eid_eht_basic_ml(hapd, bmle_ie, NULL, true);
|
|
+}
|
|
+
|
|
+
|
|
+static size_t hostapd_wpa_ft_add_bmle_len(void *ctx, void *mle_data)
|
|
+{
|
|
+ struct hostapd_data *hapd = ctx;
|
|
+
|
|
+ return hostapd_eid_eht_basic_ml_len(hapd, NULL, true);
|
|
+}
|
|
+
|
|
|
|
static int hostapd_wpa_register_ft_oui(struct hostapd_data *hapd,
|
|
const char *ft_iface)
|
|
@@ -1637,6 +1652,8 @@ int hostapd_setup_wpa(struct hostapd_dat
|
|
.add_sta = hostapd_wpa_auth_add_sta,
|
|
.add_sta_ft = hostapd_wpa_auth_add_sta_ft,
|
|
.add_tspec = hostapd_wpa_auth_add_tspec,
|
|
+ .add_bmle = hostapd_wpa_ft_add_bmle,
|
|
+ .add_bmle_len = hostapd_wpa_ft_add_bmle_len,
|
|
.set_vlan = hostapd_wpa_auth_set_vlan,
|
|
.get_vlan = hostapd_wpa_auth_get_vlan,
|
|
.set_identity = hostapd_wpa_auth_set_identity,
|