mac80211: failed forwarded mesh frame addressing

Don't write the TA until next hop is actually known, since we might need
the original TA for sending a PERR. Previously we would send a PERR to
ourself if path resolution for a forwarded frame failed.

Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Thomas Pedersen
2011-11-24 17:15:21 -08:00
committed by John W. Linville
parent 4bb62344e4
commit 7e3c88660b
3 changed files with 8 additions and 11 deletions

View File

@@ -1029,9 +1029,10 @@ int mesh_nexthop_lookup(struct sk_buff *skb,
PREQ_Q_F_START | PREQ_Q_F_REFRESH);
}
next_hop = rcu_dereference(mpath->next_hop);
if (next_hop)
if (next_hop) {
memcpy(hdr->addr1, next_hop->sta.addr, ETH_ALEN);
else
memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
} else
err = -ENOENT;
} else {
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);