svn commit: r194438 - projects/mesh11s/sys/net80211
Rui Paulo
rpaulo at FreeBSD.org
Thu Jun 18 11:53:44 UTC 2009
Author: rpaulo
Date: Thu Jun 18 11:53:43 2009
New Revision: 194438
URL: http://svn.freebsd.org/changeset/base/194438
Log:
Consult the MAC ACL list just once at the proper place.
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 Thu Jun 18 11:35:29 2009 (r194437)
+++ projects/mesh11s/sys/net80211/ieee80211_mesh.c Thu Jun 18 11:53:43 2009 (r194438)
@@ -323,6 +323,16 @@ mesh_input(struct ieee80211_node *ni, st
goto err;
}
+ /*
+ * 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_ACL,
+ wh, NULL, "%s", "disallowed by ACL");
+ vap->iv_stats.is_rx_acl++;
+ goto out;
+ }
+
dir = wh->i_fc[1] & IEEE80211_FC1_DIR_MASK;
type = wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK;
subtype = wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_MASK;
@@ -549,15 +559,6 @@ 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_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 &&
@@ -740,15 +741,6 @@ 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.
*/
switch (ia->ia_action) {
More information about the svn-src-projects
mailing list