]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Do not override WDS VLAN assignment for STA
authorJouni Malinen <j@w1.fi>
Sat, 7 Mar 2020 11:56:56 +0000 (13:56 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Mar 2020 11:56:56 +0000 (13:56 +0200)
The 4-address frames WDS design in mac80211 uses VLAN interfaces
similarly to the way VLAN interfaces based on VLAN IDs are used. The EAP
authentication case ended up overriding the WDS specific assignment even
when the RADIUS server did not assign any specific VLAN for the STA.
This broke WDS traffic.

Fix this by skipping VLAN assignment to VLAN ID 0 for STAs that have
been detected to use 4-address frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/sta_info.c

index 87a9fd409c91db4adc11e0a58462c959f7988080..26885ea4998e92da4caf508b0599d282f1339c93 100644 (file)
@@ -1027,6 +1027,13 @@ int ap_sta_bind_vlan(struct hostapd_data *hapd, struct sta_info *sta)
        int ret;
        int old_vlanid = sta->vlan_id_bound;
 
+       if ((sta->flags & WLAN_STA_WDS) && sta->vlan_id == 0) {
+               wpa_printf(MSG_DEBUG,
+                          "Do not override WDS VLAN assignment for STA "
+                          MACSTR, MAC2STR(sta->addr));
+               return 0;
+       }
+
        iface = hapd->conf->iface;
        if (hapd->conf->ssid.vlan[0])
                iface = hapd->conf->ssid.vlan;