svn commit: r194372 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Wed Jun 17 16:14:33 UTC 2009
Author: rpaulo
Date: Wed Jun 17 16:14:32 2009
New Revision: 194372
URL: http://svn.freebsd.org/changeset/base/194372
Log:
* stop callouts on detach
* discard mesh peer action frames if dest is not us.
Sponsored by: The FreeBSD Foundation
Modified:
projects/mesh11s/sys/net80211/ieee80211_mesh.c
Modified: projects/mesh11s/sys/net80211/ieee80211_mesh.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_mesh.c Wed Jun 17 15:57:53 2009 (r194371)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Wed Jun 17 16:14:32 2009 (r194372)
@@ -109,8 +109,17 @@ ieee80211_mesh_detach(struct ieee80211co
}
static void
+mesh_detach_stoptimers(void *arg, struct ieee80211_node *ni)
+{
+ callout_stop(&ni->ni_mltimer);
+}
+
+
+static void
mesh_vdetach(struct ieee80211vap *vap)
{
+ ieee80211_iterate_nodes(&vap->iv_ic->ic_sta, mesh_detach_stoptimers,
+ NULL);
ieee80211_hwmp_vdetach(vap);
}
@@ -249,7 +258,7 @@ mesh_linkchange(struct ieee80211_node *n
* peer establishment.
*/
static void
-_mesh_checkid(void *arg, struct ieee80211_node *ni)
+mesh_checkid(void *arg, struct ieee80211_node *ni)
{
uint16_t *r = arg;
@@ -264,7 +273,7 @@ mesh_generateid(struct ieee80211vap *vap
restart:
get_random_bytes(&r, 2);
- ieee80211_iterate_nodes(&vap->iv_ic->ic_sta, _mesh_checkid, &r);
+ ieee80211_iterate_nodes(&vap->iv_ic->ic_sta, mesh_checkid, &r);
if (r == 0)
goto restart;
@@ -714,6 +723,12 @@ mesh_recv_action(struct ieee80211_node *
*/
case IEEE80211_ACTION_CAT_MESHPEERING:
/*
+ * Discard if not for us.
+ */
+ if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, wh->i_addr1))
+ return;
+
+ /*
* Compute the start of fixed/tagged parameters.
*/
switch (ia->ia_action) {
More information about the svn-src-projects
mailing list