summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_hwmp.c
diff options
context:
space:
mode:
authormonthadar <monthadar@FreeBSD.org>2013-02-07 21:17:35 +0000
committermonthadar <monthadar@FreeBSD.org>2013-02-07 21:17:35 +0000
commit6029a16e375b541b537876704c1732f0da927ae6 (patch)
tree6e31d89674a3fceef904084b263bcd619eb1cdf8 /sys/net80211/ieee80211_hwmp.c
parent33a227cb8a9298b01a68557611f44b3b7c374a5b (diff)
downloadFreeBSD-src-6029a16e375b541b537876704c1732f0da927ae6.zip
FreeBSD-src-6029a16e375b541b537876704c1732f0da927ae6.tar.gz
Fix mesh path flag.
* A bug occurs while in discovery mode which leaves a path marked with both Discover and Valid flag. This happens when receiving/sending PREQ and PREP in a particular order. Solution is to assign the Valid bit instead of oring it; Approved by: adrian (mentor)
Diffstat (limited to 'sys/net80211/ieee80211_hwmp.c')
-rw-r--r--sys/net80211/ieee80211_hwmp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index 2f8ec85..f15347c 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -995,8 +995,11 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
rtorig->rt_metric = metric;
rtorig->rt_nhops = preq->preq_hopcount + 1;
ieee80211_mesh_rt_update(rtorig, preq->preq_lifetime);
- /* path to orig is valid now */
- rtorig->rt_flags |= IEEE80211_MESHRT_FLAGS_VALID;
+ /* Path to orig is valid now.
+ * NB: we know it can't be Proxy, and if it is GATE
+ * it will be marked below.
+ */
+ rtorig->rt_flags = IEEE80211_MESHRT_FLAGS_VALID;
}else if ((hrtarg != NULL &&
HWMP_SEQ_EQ(hrtarg->hr_seq, PREQ_TSEQ(0)) &&
((rtorig->rt_flags & IEEE80211_MESHRT_FLAGS_VALID) == 0)) ||
OpenPOWER on IntegriCloud