diff options
author | Thomas Pedersen <thomas@cozybit.com> | 2011-11-24 17:15:21 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-28 14:44:03 -0500 |
commit | 7e3c88660b5b90f437cf466b1805089ccb764ee3 (patch) | |
tree | 7b624ef198521b908750da24b0577175e2c71235 /net/mac80211/mesh_hwmp.c | |
parent | 4bb62344e4703414fd253ceb07c163ac37da80d4 (diff) |
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>
Diffstat (limited to 'net/mac80211/mesh_hwmp.c')
-rw-r--r-- | net/mac80211/mesh_hwmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/mesh_hwmp.c b/net/mac80211/mesh_hwmp.c index ce3db2735d7c..1b13135d7f35 100644 --- a/net/mac80211/mesh_hwmp.c +++ b/net/mac80211/mesh_hwmp.c @@ -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); |