svn commit: r194402 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Wed Jun 17 21:24:36 UTC 2009
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.
*/
More information about the svn-src-projects
mailing list