Remove now redundant mac argument.

Discussed with:	adrian@
This commit is contained in:
Bernhard Schmidt 2011-12-17 10:32:31 +00:00
parent fcd9500f91
commit 5a8801b0ea
4 changed files with 8 additions and 14 deletions

View File

@ -152,8 +152,7 @@ _acl_free(struct aclstate *as, struct acl *acl)
} }
static int static int
acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh, acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh)
const uint8_t mac[IEEE80211_ADDR_LEN])
{ {
struct aclstate *as = vap->iv_as; struct aclstate *as = vap->iv_as;
@ -162,9 +161,9 @@ acl_check(struct ieee80211vap *vap, const struct ieee80211_frame *wh,
case ACL_POLICY_RADIUS: case ACL_POLICY_RADIUS:
return 1; return 1;
case ACL_POLICY_ALLOW: case ACL_POLICY_ALLOW:
return _find_acl(as, mac) != NULL; return _find_acl(as, wh->i_addr2) != NULL;
case ACL_POLICY_DENY: case ACL_POLICY_DENY:
return _find_acl(as, mac) == NULL; return _find_acl(as, wh->i_addr2) == NULL;
} }
return 0; /* should not happen */ return 0; /* should not happen */
} }

View File

@ -1797,8 +1797,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
/* /*
* Consult the ACL policy module if setup. * Consult the ACL policy module if setup.
*/ */
if (vap->iv_acl != NULL && if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
!vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL, IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL"); wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_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. * Consult the ACL policy module if setup.
*/ */
if (vap->iv_acl != NULL && if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
!vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL, IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL"); wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++; vap->iv_stats.is_rx_acl++;

View File

@ -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. * NB: this check is also done upon peering link initiation.
*/ */
if (vap->iv_acl != NULL && if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
!vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL, IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL"); wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_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. * Peer only based on the current ACL policy.
*/ */
if (vap->iv_acl != NULL && if (vap->iv_acl != NULL && !vap->iv_acl->iac_check(vap, wh)) {
!vap->iv_acl->iac_check(vap, wh, wh->i_addr2)) {
IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL, IEEE80211_DISCARD(vap, IEEE80211_MSG_ACL,
wh, NULL, "%s", "disallowed by ACL"); wh, NULL, "%s", "disallowed by ACL");
vap->iv_stats.is_rx_acl++; vap->iv_stats.is_rx_acl++;

View File

@ -215,8 +215,7 @@ struct ieee80211_aclator {
int (*iac_attach)(struct ieee80211vap *); int (*iac_attach)(struct ieee80211vap *);
void (*iac_detach)(struct ieee80211vap *); void (*iac_detach)(struct ieee80211vap *);
int (*iac_check)(struct ieee80211vap *, int (*iac_check)(struct ieee80211vap *,
const struct ieee80211_frame *wh, const struct ieee80211_frame *wh);
const uint8_t mac[IEEE80211_ADDR_LEN]);
int (*iac_add)(struct ieee80211vap *, int (*iac_add)(struct ieee80211vap *,
const uint8_t mac[IEEE80211_ADDR_LEN]); const uint8_t mac[IEEE80211_ADDR_LEN]);
int (*iac_remove)(struct ieee80211vap *, int (*iac_remove)(struct ieee80211vap *,