]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Multi-AP: Honor wds_sta even with multi_ap
authorgasmibal@gmail.com <gasmibal@gmail.com>
Sun, 28 Apr 2024 19:47:21 +0000 (21:47 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 13 Jul 2024 15:09:32 +0000 (18:09 +0300)
When multi_ap is active, hostapd creates an AP-VLAN interface for 4addr
stations, even though wds_sta is not configured.

A check should be added to determine if wds_sta is active before
re-enabling the WDS mode by creating an AP-VLAN for 4addr stations.

Signed-off-by: Baligh Gasmi <gasmibal@gmail.com>
src/ap/ieee802_11.c
src/ap/sta_info.c

index efcc27a5042d4747a411d6911d356179e846f60a..6c516bc8a93d2232d3ca610d652829a2456f8c5d 100644 (file)
@@ -6647,6 +6647,7 @@ static void handle_assoc_cb(struct hostapd_data *hapd,
        if ((sta->flags & WLAN_STA_WDS) ||
            (sta->flags & WLAN_STA_MULTI_AP &&
             (hapd->conf->multi_ap & BACKHAUL_BSS) &&
+            hapd->conf->wds_sta &&
             !(sta->flags & WLAN_STA_WPS))) {
                int ret;
                char ifname_wds[IFNAMSIZ + 1];
index 24ba86b11b7c6fd1207513c943838049c0f8230b..13613dbab0d649d52cc74ba0fe15d24883321d4d 100644 (file)
@@ -235,6 +235,7 @@ void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
        if ((sta->flags & WLAN_STA_WDS) ||
            (sta->flags & WLAN_STA_MULTI_AP &&
             (hapd->conf->multi_ap & BACKHAUL_BSS) &&
+            hapd->conf->wds_sta &&
             !(sta->flags & WLAN_STA_WPS)))
                hostapd_set_wds_sta(hapd, NULL, sta->addr, sta->aid, 0);