From 43ededa9c74e3762bcf2f78841790eeecfa8ad56 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 7 Mar 2020 13:56:56 +0200 Subject: [PATCH] Do not override WDS VLAN assignment for STA 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 --- src/ap/sta_info.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 87a9fd409..26885ea49 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -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; -- 2.47.2