summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2011-12-17 10:32:31 +0000
committerbschmidt <bschmidt@FreeBSD.org>2011-12-17 10:32:31 +0000
commitd812d4dc6a926ad93b9c51ee84d7fa2430670d3a (patch)
tree65ce2ac4e1fb1a8f07c11807c3a9a30c056f233e /sys/net80211
parent49344f6037da62f1994e58cd9a5ba941ac34c519 (diff)
downloadFreeBSD-src-d812d4dc6a926ad93b9c51ee84d7fa2430670d3a.zip
FreeBSD-src-d812d4dc6a926ad93b9c51ee84d7fa2430670d3a.tar.gz
Remove now redundant mac argument.
Discussed with: adrian@
Diffstat (limited to 'sys/net80211')
-rw-r--r--sys/net80211/ieee80211_acl.c7
-rw-r--r--sys/net80211/ieee80211_hostap.c6
-rw-r--r--sys/net80211/ieee80211_mesh.c6
-rw-r--r--sys/net80211/ieee80211_proto.h3
4 files changed, 8 insertions, 14 deletions
diff --git a/sys/net80211/ieee80211_acl.c b/sys/net80211/ieee80211_acl.c
index feff4ad..ac604fb 100644
--- a/sys/net80211/ieee80211_acl.c
+++ b/sys/net80211/ieee80211_acl.c
@@ -152,8 +152,7 @@ _acl_free(struct aclstate *as, struct acl *acl)
}
static int
-acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh,
- const uint8_t mac[IEEE80211_ADDR_LEN])
+acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh)
{
struct aclstate *as = vap->iv_as;
@@ -162,9 +161,9 @@ acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh,
case ACL_POLICY_RADIUS:
return 1;
case ACL_POLICY_ALLOW:
- return _find_acl(as, mac) != NULL;
+ return _find_acl(as, wh->i_addr2) != NULL;
case ACL_POLICY_DENY:
- return _find_acl(as, mac) == NULL;
+ return _find_acl(as, wh->i_addr2) == NULL;
}
return 0; /* should not happen */
}
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index 625e45e..72e1771 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -1797,8 +1797,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
/*
* Consult the ACL policy module if setup.
*/
- if (vap->iv_acl != NULL &&
- !vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
@@ -1883,8 +1882,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
/*
* Consult the ACL policy module if setup.
*/
- if (vap->iv_acl != NULL &&
- !vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index d6e992b..b92f695 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1120,8 +1120,7 @@ mesh_input(struct ieee80211_node *ni, struct mbuf *m, int rssi, int nf)
*
* NB: this check is also done upon peering link initiation.
*/
- if (vap->iv_acl != NULL &&
- !vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
@@ -1379,8 +1378,7 @@ mesh_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, int subtype,
/*
* Peer only based on the current ACL policy.
*/
- if (vap->iv_acl != NULL &&
- !vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
+ if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
diff --git a/sys/net80211/ieee80211_proto.h b/sys/net80211/ieee80211_proto.h
index fbd32d3..f8bce62 100644
--- a/sys/net80211/ieee80211_proto.h
+++ b/sys/net80211/ieee80211_proto.h
@@ -215,8 +215,7 @@ struct ieee80211_aclator {
int (*iac_attach)(struct ieee80211vap *);
void (*iac_detach)(struct ieee80211vap *);
int (*iac_check)(struct ieee80211vap *,
- const struct ieee80211_frame *wh,
- const uint8_t mac[IEEE80211_ADDR_LEN]);
+ const struct ieee80211_frame *wh);
int (*iac_add)(struct ieee80211vap *,
const uint8_t mac[IEEE80211_ADDR_LEN]);
int (*iac_remove)(struct ieee80211vap *,
OpenPOWER on IntegriCloud