From: Jouni Malinen Date: Sat, 7 Mar 2020 11:56:56 +0000 (+0200) Subject: Do not override WDS VLAN assignment for STA X-Git-Tag: hostap_2_10~1668 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43ededa9c74e3762bcf2f78841790eeecfa8ad56;p=thirdparty%2Fhostap.git 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 --- 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;