7079957ee672ce5c5e2aba0742e776e11e4c6084
[openwrt-10.03/.git] / package / mac80211 / patches / 560-4addr_vlan_check.patch
1 --- a/net/mac80211/tx.c
2 +++ b/net/mac80211/tx.c
3 @@ -1051,8 +1051,11 @@ ieee80211_tx_prepare(struct ieee80211_su
4  
5         hdr = (struct ieee80211_hdr *) skb->data;
6  
7 -       if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
8 +       if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) {
9                 tx->sta = rcu_dereference(sdata->u.vlan.sta);
10 +               if (!tx->sta && sdata->dev->ieee80211_ptr->use_4addr)
11 +                       return TX_DROP;
12 +       }
13         if (!tx->sta)
14                 tx->sta = sta_info_get(sdata, hdr->addr1);
15