AP: Match received Management frames against MLD address
Once a station is added to the underlying driver, the driver is expected to do address translation and use MLD addresses. Thus, when handling a received Management frame, match it against the MLD address. Signed-off-by: Ilan Peer <ilan.peer@intel.com>
This commit is contained in:
parent
a213fee11d
commit
79a9df6e88
2 changed files with 19 additions and 2 deletions
|
@ -1459,6 +1459,7 @@ static int hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt)
|
||||||
const u8 *bssid;
|
const u8 *bssid;
|
||||||
struct hostapd_frame_info fi;
|
struct hostapd_frame_info fi;
|
||||||
int ret;
|
int ret;
|
||||||
|
bool is_mld = false;
|
||||||
|
|
||||||
#ifdef CONFIG_TESTING_OPTIONS
|
#ifdef CONFIG_TESTING_OPTIONS
|
||||||
if (hapd->ext_mgmt_frame_handling) {
|
if (hapd->ext_mgmt_frame_handling) {
|
||||||
|
@ -1480,8 +1481,16 @@ static int hostapd_mgmt_rx(struct hostapd_data *hapd, struct rx_mgmt *rx_mgmt)
|
||||||
if (bssid == NULL)
|
if (bssid == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
hapd = get_hapd_bssid(iface, bssid);
|
#ifdef CONFIG_IEEE80211BE
|
||||||
if (hapd == NULL) {
|
if (hapd->conf->mld_ap &&
|
||||||
|
os_memcmp(hapd->mld_addr, bssid, ETH_ALEN) == 0)
|
||||||
|
is_mld = true;
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
|
|
||||||
|
if (!is_mld)
|
||||||
|
hapd = get_hapd_bssid(iface, bssid);
|
||||||
|
|
||||||
|
if (!hapd) {
|
||||||
u16 fc = le_to_host16(hdr->frame_control);
|
u16 fc = le_to_host16(hdr->frame_control);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5495,6 +5495,10 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
||||||
#ifdef CONFIG_MESH
|
#ifdef CONFIG_MESH
|
||||||
!(hapd->conf->mesh & MESH_ENABLED) &&
|
!(hapd->conf->mesh & MESH_ENABLED) &&
|
||||||
#endif /* CONFIG_MESH */
|
#endif /* CONFIG_MESH */
|
||||||
|
#ifdef CONFIG_IEEE80211BE
|
||||||
|
!(hapd->conf->mld_ap &&
|
||||||
|
os_memcmp(hapd->mld_addr, mgmt->bssid, ETH_ALEN) == 0) &&
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
os_memcmp(mgmt->bssid, hapd->own_addr, ETH_ALEN) != 0) {
|
os_memcmp(mgmt->bssid, hapd->own_addr, ETH_ALEN) != 0) {
|
||||||
wpa_printf(MSG_INFO, "MGMT: BSSID=" MACSTR " not our address",
|
wpa_printf(MSG_INFO, "MGMT: BSSID=" MACSTR " not our address",
|
||||||
MAC2STR(mgmt->bssid));
|
MAC2STR(mgmt->bssid));
|
||||||
|
@ -5514,6 +5518,10 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
|
||||||
|
|
||||||
if ((!is_broadcast_ether_addr(mgmt->da) ||
|
if ((!is_broadcast_ether_addr(mgmt->da) ||
|
||||||
stype != WLAN_FC_STYPE_ACTION) &&
|
stype != WLAN_FC_STYPE_ACTION) &&
|
||||||
|
#ifdef CONFIG_IEEE80211BE
|
||||||
|
!(hapd->conf->mld_ap &&
|
||||||
|
os_memcmp(hapd->mld_addr, mgmt->bssid, ETH_ALEN) == 0) &&
|
||||||
|
#endif /* CONFIG_IEEE80211BE */
|
||||||
os_memcmp(mgmt->da, hapd->own_addr, ETH_ALEN) != 0) {
|
os_memcmp(mgmt->da, hapd->own_addr, ETH_ALEN) != 0) {
|
||||||
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
hostapd_logger(hapd, mgmt->sa, HOSTAPD_MODULE_IEEE80211,
|
||||||
HOSTAPD_LEVEL_DEBUG,
|
HOSTAPD_LEVEL_DEBUG,
|
||||||
|
|
Loading…
Add table
Reference in a new issue