summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_mesh.c
diff options
context:
space:
mode:
authormonthadar <monthadar@FreeBSD.org>2012-05-01 16:12:39 +0000
committermonthadar <monthadar@FreeBSD.org>2012-05-01 16:12:39 +0000
commit730d2de83b0e430a8391d9bf541db9868ccf1394 (patch)
tree9646b9dc3267150145013ed887e0862a4a5fdfe8 /sys/net80211/ieee80211_mesh.c
parent1b62f837a74de5f2bce3d3333e5b82ecae62a36e (diff)
downloadFreeBSD-src-730d2de83b0e430a8391d9bf541db9868ccf1394.zip
FreeBSD-src-730d2de83b0e430a8391d9bf541db9868ccf1394.tar.gz
PERR update to be called from mesh code.
* Added mpp_senderror for Mesh Path Selection protocol; * Added hwmp_senderror that will send an HWMP PERR according to the supplied reason code; * Call mpp_senderror when deleting a route with correct reason code for whether the route is marked proxy or not; * Call mpp_senderror when trying to forward an individually addressed frame and there is no forwarding information; Approved by: adrian
Diffstat (limited to 'sys/net80211/ieee80211_mesh.c')
-rw-r--r--sys/net80211/ieee80211_mesh.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index c533491..3cc0d3e 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -344,6 +344,13 @@ ieee80211_mesh_rt_del(struct ieee80211vap *vap,
MESH_RT_LOCK(ms);
TAILQ_FOREACH_SAFE(rt, &ms->ms_routes, rt_next, next) {
if (IEEE80211_ADDR_EQ(rt->rt_dest, dest)) {
+ if (rt->rt_flags & IEEE80211_MESHRT_FLAGS_PROXY) {
+ ms->ms_ppath->mpp_senderror(vap, dest, rt,
+ IEEE80211_REASON_MESH_PERR_NO_PROXY);
+ } else {
+ ms->ms_ppath->mpp_senderror(vap, dest, rt,
+ IEEE80211_REASON_MESH_PERR_DEST_UNREACH);
+ }
mesh_rt_del(ms, rt);
MESH_RT_UNLOCK(ms);
return;
@@ -972,10 +979,12 @@ mesh_forward(struct ieee80211vap *vap, struct mbuf *m,
* [Optional] any of the following three actions:
* o silently discard
* o trigger a path discovery
- * o inform TA that meshDA is unreachable.
+ * o inform TA that meshDA is unknown.
*/
IEEE80211_NOTE_FRAME(vap, IEEE80211_MSG_MESH, wh,
"%s", "frame not fwd'd, no path");
+ ms->ms_ppath->mpp_senderror(vap, whcopy->i_addr3, NULL,
+ IEEE80211_REASON_MESH_PERR_NO_FI);
vap->iv_stats.is_mesh_fwd_nopath++;
m_freem(mcopy);
return;
OpenPOWER on IntegriCloud