[PATCH 1/1] hostapd: Update port authorized indication for mlo address
Vinayak Yadawad
vinayak.yadawad at broadcom.com
Mon Nov 20 04:39:33 PST 2023
Handling of port authorized event for STA currently handles the
connected BSSID. This needs additional handling to support the
MLD AP address in case of MLO connection. The connected_addr
expected by cfg80211_port_authorized is mld_addr for ML
connection case.
Signed-off-by: Vinayak Yadawad <vinayak.yadawad at broadcom.com>
---
src/drivers/driver_nl80211_event.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c
index 0091032e5..10e016bfc 100644
--- a/src/drivers/driver_nl80211_event.c
+++ b/src/drivers/driver_nl80211_event.c
@@ -3495,6 +3495,7 @@ static void nl80211_port_authorized(struct wpa_driver_nl80211_data *drv,
{
const u8 *addr;
union wpa_event_data event;
+ const u8 *connected_addr;
os_memset(&event, 0, sizeof(event));
@@ -3511,13 +3512,16 @@ static void nl80211_port_authorized(struct wpa_driver_nl80211_data *drv,
wpa_printf(MSG_DEBUG,
"nl80211: Port authorized for STA addr " MACSTR,
MAC2STR(addr));
- } else if (is_sta_interface(drv->nlmode) &&
- os_memcmp(addr, drv->bssid, ETH_ALEN) != 0) {
- wpa_printf(MSG_DEBUG,
- "nl80211: Ignore port authorized event for " MACSTR
- " (not the currently connected BSSID " MACSTR ")",
- MAC2STR(addr), MAC2STR(drv->bssid));
- return;
+ } else if (is_sta_interface(drv->nlmode)) {
+ connected_addr = drv->sta_mlo_info.valid_links ?
+ drv->sta_mlo_info.ap_mld_addr : drv->bssid;
+ if (os_memcmp(addr, connected_addr, ETH_ALEN) != 0) {
+ wpa_printf(MSG_DEBUG,
+ "nl80211: Ignore port authorized event for " MACSTR
+ " (not the currently connected BSSID " MACSTR ")",
+ MAC2STR(addr), MAC2STR(connected_addr));
+ return;
+ }
}
if (tb[NL80211_ATTR_TD_BITMAP]) {
--
2.32.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4218 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20231120/3b7819e4/attachment.p7s>
More information about the Hostap
mailing list