Lines Matching full:acl
30 * IEEE 802.11 MAC ACL support.
60 ACL_POLICY_OPEN = 0, /* open, don't check ACL's */
68 ACL_POLICY_RADIUS = 7, /* defer to RADIUS ACL server */
73 struct acl { struct
74 TAILQ_ENTRY(acl) acl_list;
75 LIST_ENTRY(acl) acl_hash;
82 TAILQ_HEAD(, acl) as_list; /* list of all ACL's */
83 LIST_HEAD(, acl) as_hash[ACL_HASHSIZE];
91 static MALLOC_DEFINE(M_80211_ACL, "acl", "802.11 station acl");
107 ACL_LOCK_INIT(as, "acl"); in acl_attach()
130 static __inline struct acl *
133 struct acl *acl; in _find_acl() local
137 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) { in _find_acl()
138 if (IEEE80211_ADDR_EQ(acl->acl_macaddr, macaddr)) in _find_acl()
139 return acl; in _find_acl()
145 _acl_free(struct aclstate *as, struct acl *acl) in _acl_free() argument
149 TAILQ_REMOVE(&as->as_list, acl, acl_list); in _acl_free()
150 LIST_REMOVE(acl, acl_hash); in _acl_free()
151 IEEE80211_FREE(acl, M_80211_ACL); in _acl_free()
176 struct acl *acl, *new; in acl_add() local
179 new = (struct acl *) IEEE80211_MALLOC(sizeof(struct acl), in acl_add()
183 "ACL: add %s failed, no memory\n", ether_sprintf(mac)); in acl_add()
190 LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) { in acl_add()
191 if (IEEE80211_ADDR_EQ(acl->acl_macaddr, mac)) { in acl_add()
195 "ACL: add %s failed, already present\n", in acl_add()
207 "ACL: add %s\n", ether_sprintf(mac)); in acl_add()
215 struct acl *acl; in acl_remove() local
218 acl = _find_acl(as, mac); in acl_remove()
219 if (acl != NULL) in acl_remove()
220 _acl_free(as, acl); in acl_remove()
224 "ACL: remove %s%s\n", ether_sprintf(mac), in acl_remove()
225 acl == NULL ? ", not present" : ""); in acl_remove()
227 return (acl == NULL ? ENOENT : 0); in acl_remove()
234 struct acl *acl; in acl_free_all() local
236 IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL, "ACL: %s\n", "free all"); in acl_free_all()
239 while ((acl = TAILQ_FIRST(&as->as_list)) != NULL) in acl_free_all()
240 _acl_free(as, acl); in acl_free_all()
252 "ACL: set policy to %u\n", policy); in acl_setpolicy()
292 struct acl *acl; in acl_getioctl() local
313 TAILQ_FOREACH(acl, &as->as_list, acl_list) { in acl_getioctl()
314 IEEE80211_ADDR_COPY(ap[i].ml_macaddr, acl->acl_macaddr); in acl_getioctl()