]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Define new BSS command info mask for AP MLD address
authorKiran Kumar Lokere <quic_klokere@quicinc.com>
Wed, 23 Aug 2023 19:40:53 +0000 (12:40 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 31 Aug 2023 12:23:05 +0000 (15:23 +0300)
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 <quic_jouni@quicinc.com>
src/common/wpa_ctrl.h
wpa_supplicant/ctrl_iface.c

index ccff0ee09135b45181de4886412867372dbaad63..416e0d6a848d930bf76fcef5432418bd1d7996e4 100644 (file)
@@ -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 */
index 4363dde1fe54428035762e4b16ceb9f54b9f9c3a..b14c78f807d789061dc31912343508b4924b34f8 100644 (file)
@@ -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));