summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_hwmp.c
diff options
context:
space:
mode:
authormonthadar <monthadar@FreeBSD.org>2013-02-07 21:24:52 +0000
committermonthadar <monthadar@FreeBSD.org>2013-02-07 21:24:52 +0000
commit4ef618069cca4eaa62cd2dc2529e8fc7ca2db7d9 (patch)
treedab8efd5f1cc51c7780544d18143b8df9202a5de /sys/net80211/ieee80211_hwmp.c
parent81a1f6861c46b58a16eff6195b4bb1b937dbcbaa (diff)
downloadFreeBSD-src-4ef618069cca4eaa62cd2dc2529e8fc7ca2db7d9.zip
FreeBSD-src-4ef618069cca4eaa62cd2dc2529e8fc7ca2db7d9.tar.gz
Mark root mesh as gate when mesh gate flag set.
* Add function ieee80211_mesh_mark_gate in ieee80211_mesh.h; * When received a proactive PREQ or RANN with corresponding mesh gate flag set, create a new entry in the known mesh gate list; Approved by: adrian (mentor)
Diffstat (limited to 'sys/net80211/ieee80211_hwmp.c')
-rw-r--r--sys/net80211/ieee80211_hwmp.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_hwmp.c b/sys/net80211/ieee80211_hwmp.c
index 0305199..c740afd 100644
--- a/sys/net80211/ieee80211_hwmp.c
+++ b/sys/net80211/ieee80211_hwmp.c
@@ -1092,6 +1092,16 @@ hwmp_recv_preq(struct ieee80211vap *vap, struct ieee80211_node *ni,
IEEE80211_NOTE(vap, IEEE80211_MSG_HWMP, ni,
"root mesh station @ %6D", preq->preq_origaddr, ":");
+ /* Check if root is a mesh gate, mark it */
+ if (preq->preq_flags & IEEE80211_MESHPREQ_FLAGS_GATE) {
+ struct ieee80211_mesh_gate_route *gr;
+
+ rtorig->rt_flags |= IEEE80211_MESHRT_FLAGS_GATE;
+ gr = ieee80211_mesh_mark_gate(vap, preq->preq_origaddr,
+ rtorig);
+ gr->gr_lastseq = 0; /* NOT GANN */
+ }
+
/*
* Reply with a PREP if we don't have a path to the root
* or if the root sent us a proactive PREQ.
@@ -1745,6 +1755,15 @@ hwmp_recv_rann(struct ieee80211vap *vap, struct ieee80211_node *ni,
}
}
hr = IEEE80211_MESH_ROUTE_PRIV(rt, struct ieee80211_hwmp_route);
+ /* Check if root is a mesh gate, mark it */
+ if (rann->rann_flags & IEEE80211_MESHRANN_FLAGS_GATE) {
+ struct ieee80211_mesh_gate_route *gr;
+
+ rt->rt_flags |= IEEE80211_MESHRT_FLAGS_GATE;
+ gr = ieee80211_mesh_mark_gate(vap, rann->rann_addr,
+ rt);
+ gr->gr_lastseq = 0; /* NOT GANN */
+ }
/* discovery timeout */
ieee80211_mesh_rt_update(rt,
ticks_to_msecs(ieee80211_hwmp_roottimeout));
OpenPOWER on IntegriCloud