summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_hostap.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-12-15 00:52:30 +0000
committeradrian <adrian@FreeBSD.org>2011-12-15 00:52:30 +0000
commit78bb8e5fa2902f0e0d26781527fb5bcd4d13fb36 (patch)
treec0a506e92899f5b8dd0cdd2989e1bbc7470db542 /sys/net80211/ieee80211_hostap.c
parente23259ae4e0dd7e56235ac44f70300d0a986b284 (diff)
downloadFreeBSD-src-78bb8e5fa2902f0e0d26781527fb5bcd4d13fb36.zip
FreeBSD-src-78bb8e5fa2902f0e0d26781527fb5bcd4d13fb36.tar.gz
Modify the ACL code slightly to support a few nifty things:
* Call it before sending probe responses, so the ACL code has the chance to reject sending them. * Pass the whole frame to the ACL code now, rather than just the destination MAC - that way the ACL module can look at the frame contents to determine what the response should be. This is part of some uncommitted work to support band steering. Sponsored by: Hobnob, Inc.
Diffstat (limited to 'sys/net80211/ieee80211_hostap.c')
-rw-r--r--sys/net80211/ieee80211_hostap.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c
index e190450..625e45e 100644
--- a/sys/net80211/ieee80211_hostap.c
+++ b/sys/net80211/ieee80211_hostap.c
@@ -1795,6 +1795,16 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
return;
}
/*
+ * Consult the ACL policy module if setup.
+ */
+ if (vap->iv_acl != NULL &&
+ !vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
+ wh, NULL, "%s", "disallowed by ACL");
+ vap->iv_stats.is_rx_acl++;
+ return;
+ }
+ /*
* prreq frame format
* [tlv] ssid
* [tlv] supported rates
@@ -1874,7 +1884,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->i_addr2)) {
+ !vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++;
OpenPOWER on IntegriCloud