From owner-svn-src-projects@FreeBSD.ORG Thu Jun 18 11:53:44 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FF77106566B; Thu, 18 Jun 2009 11:53:44 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 337D48FC0C; Thu, 18 Jun 2009 11:53:44 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5IBrhUr010733; Thu, 18 Jun 2009 11:53:43 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5IBrhwV010731; Thu, 18 Jun 2009 11:53:43 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200906181153.n5IBrhwV010731@svn.freebsd.org> From: Rui Paulo Date: Thu, 18 Jun 2009 11:53:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r194438 - projects/mesh11s/sys/net80211 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2009 11:53:44 -0000 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) {