When receiving data frames, we can send them only to the interface they belong to based on transmitting station (this doesn't work for probe requests). Also, don't try to handle other frames for AP_VLAN at all since those interface should only receive data. Additionally, the transmit side must check that the station we're sending a frame to is actually on the interface we're transmitting on, and not transmit packets to functions that live on other interfaces, so validate that as well. Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxx --- net/mac80211/rx.c | 10 ++++++++-- net/mac80211/tx.c | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) --- wireless-testing.orig/net/mac80211/rx.c 2009-09-30 21:38:59.000000000 +0200 +++ wireless-testing/net/mac80211/rx.c 2009-09-30 22:09:54.000000000 +0200 @@ -2164,11 +2164,17 @@ static void __ieee80211_rx_handle_packet skb = rx.skb; - list_for_each_entry_rcu(sdata, &local->interfaces, list) { + if (rx.sdata && ieee80211_is_data(hdr->frame_control)) { + rx.flags |= IEEE80211_RX_RA_MATCH; + prepares = prepare_for_handlers(rx.sdata, &rx, hdr); + if (prepares) + prev = rx.sdata; + } else list_for_each_entry_rcu(sdata, &local->interfaces, list) { if (!netif_running(sdata->dev)) continue; - if (sdata->vif.type == NL80211_IFTYPE_MONITOR) + if (sdata->vif.type == NL80211_IFTYPE_MONITOR || + sdata->vif.type == NL80211_IFTYPE_AP_VLAN) continue; rx.flags |= IEEE80211_RX_RA_MATCH; --- wireless-testing.orig/net/mac80211/tx.c 2009-09-30 21:49:34.000000000 +0200 +++ wireless-testing/net/mac80211/tx.c 2009-09-30 22:04:25.000000000 +0200 @@ -1704,7 +1704,8 @@ netdev_tx_t ieee80211_subif_start_xmit(s if (!is_multicast_ether_addr(hdr.addr1)) { rcu_read_lock(); sta = sta_info_get(local, hdr.addr1); - if (sta) + /* XXX: in the future, use sdata to look up the sta */ + if (sta && sta->sdata == sdata) sta_flags = get_sta_flags(sta); rcu_read_unlock(); } -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html