Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2009 21:24:36 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r194402 - projects/mesh11s/sys/net80211
Message-ID:  <200906172124.n5HLOaHv088771@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Wed Jun 17 21:24:36 2009
New Revision: 194402
URL: http://svn.freebsd.org/changeset/base/194402

Log:
  Add MAC ACL support.
  
  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 21:14:07 2009	(r194401)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c	Wed Jun 17 21:24:36 2009	(r194402)
@@ -546,6 +546,15 @@ mesh_recv_mgmt(struct ieee80211_node *ni
 		if (vap->iv_state != IEEE80211_S_RUN)
 			return;
 		/*
+		 * Consult the ACL policy module if setup.
+		 */
+		if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh->i_addr2)) {
+                        IEEE80211_DISCARD(vap, IEEE80211_MSG_MESH | IEEE80211_MSG_ACL,
+                            wh, NULL, "%s", "disallowed by ACL");
+                        vap->iv_stats.is_rx_acl++;
+			return;
+		}
+		/*
 		 * Ignore non-mesh STAs and STAs for other mesh networks.
 		 */
 		if (scan.meshid &&
@@ -727,7 +736,15 @@ mesh_recv_action(struct ieee80211_node *
 		 */
 		if (!IEEE80211_ADDR_EQ(vap->iv_myaddr, wh->i_addr1))
 			return;
-
+		/*
+		 * Consult the ACL policy module if setup.
+		 */
+		if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh->i_addr2)) {
+                        IEEE80211_DISCARD(vap, IEEE80211_MSG_MESH | IEEE80211_MSG_ACL,
+                            wh, NULL, "%s", "disallowed by ACL");
+                        vap->iv_stats.is_rx_acl++;
+			return;
+		}
 		/*
 		 * Compute the start of fixed/tagged parameters.
 		 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906172124.n5HLOaHv088771>