From cfbd21663ab0b888405284022ac55676104d985f Mon Sep 17 00:00:00 2001 From: Karthikeyan Kathirvel Date: Mon, 29 Jan 2024 11:58:17 +0530 Subject: [PATCH] hostapd: add eht ml ie only when mld_ap is enabled When mld_ap is disabled mld info will be NULL and hostapd_eid_eht_basic_ml is called from wpa_ft_add_bmle this causes NULL crash due to empty mld information. EHT ML IE should be added only when mld_ap is enabled. Signed-off-by: Karthikeyan Kathirvel --- src/ap/ieee802_11_eht.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ap/ieee802_11_eht.c b/src/ap/ieee802_11_eht.c index a62eb88df1dc..df429bfaef74 100644 --- a/src/ap/ieee802_11_eht.c +++ b/src/ap/ieee802_11_eht.c @@ -604,6 +604,10 @@ u8 * hostapd_eid_eht_basic_ml(struct hostapd_data *hapd, u8 *eid, u8 link_id; u8 common_info_len; u8 max_simul_links, tid_to_link_map, active_links; + + if (!hapd->conf->mld_ap) + return pos; + /* * As the Multi-Link element can exceed the size of 255 bytes need to * first build it and then handle fragmentation. -- 2.38.0