From: Kiran Kumar Lokere Date: Wed, 23 Aug 2023 19:40:53 +0000 (-0700) Subject: Define new BSS command info mask for AP MLD address X-Git-Tag: hostap_2_11~999 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=377d617b574a41b5885d16cc56574940718ba0db;p=thirdparty%2Fhostap.git Define new BSS command info mask for AP MLD address The ap_mld_addr entry was added without introducing a new mask bit which does not follow the expected style for adding new information into the BSS command and might result in unexpected behavior for external components. Define a new BSS command information mask bit for this AP MLD address and print the AP MLD address in the BSS info only if the mask bit is set. Fixes: db99e7341a37 ("Add AP MLD address into BSS command output") Signed-off-by: Jouni Malinen --- diff --git a/src/common/wpa_ctrl.h b/src/common/wpa_ctrl.h index ccff0ee09..416e0d6a8 100644 --- a/src/common/wpa_ctrl.h +++ b/src/common/wpa_ctrl.h @@ -473,6 +473,7 @@ extern "C" { #define WPA_BSS_MASK_FILS_INDICATION BIT(24) #define WPA_BSS_MASK_RNR BIT(25) #define WPA_BSS_MASK_ML BIT(26) +#define WPA_BSS_MASK_AP_MLD_ADDR BIT(27) /* VENDOR_ELEM_* frame id values */ diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 4363dde1f..b14c78f80 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -5686,7 +5686,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss, } #endif /* CONFIG_FILS */ - if (!is_zero_ether_addr(bss->mld_addr)) { + if (!is_zero_ether_addr(bss->mld_addr) && + (mask & WPA_BSS_MASK_AP_MLD_ADDR)) { ret = os_snprintf(pos, end - pos, "ap_mld_addr=" MACSTR "\n", MAC2STR(bss->mld_addr));