hostapd: Configure driver ACL even if MAC address list is empty

Earlier commit related to MAC address based access control list
offloaded to the driver was not sending ACL configuration to the driver
if the MAC address list was empty. Remove this check as empty access
control list is a valid use case and sending ACL parameters should not
be dependent on whether the list is empty.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Amarnath Hullur Subramanyam 2014-06-16 16:22:36 +03:00 committed by Jouni Malinen
parent fa21e6c35b
commit cf1600ace4

View file

@ -946,35 +946,24 @@ static void hostapd_set_acl(struct hostapd_data *hapd)
if (hapd->iface->drv_max_acl_mac_addrs == 0)
return;
if (!(conf->bss[0]->num_accept_mac || conf->bss[0]->num_deny_mac))
return;
if (conf->bss[0]->macaddr_acl == DENY_UNLESS_ACCEPTED) {
if (conf->bss[0]->num_accept_mac) {
accept_acl = 1;
err = hostapd_set_acl_list(hapd,
conf->bss[0]->accept_mac,
conf->bss[0]->num_accept_mac,
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set accept acl");
return;
}
} else {
wpa_printf(MSG_DEBUG, "Mismatch between ACL Policy & Accept/deny lists file");
accept_acl = 1;
err = hostapd_set_acl_list(hapd, conf->bss[0]->accept_mac,
conf->bss[0]->num_accept_mac,
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set accept acl");
return;
}
} else if (conf->bss[0]->macaddr_acl == ACCEPT_UNLESS_DENIED) {
if (conf->bss[0]->num_deny_mac) {
accept_acl = 0;
err = hostapd_set_acl_list(hapd, conf->bss[0]->deny_mac,
conf->bss[0]->num_deny_mac,
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set deny acl");
return;
}
} else {
wpa_printf(MSG_DEBUG, "Mismatch between ACL Policy & Accept/deny lists file");
accept_acl = 0;
err = hostapd_set_acl_list(hapd, conf->bss[0]->deny_mac,
conf->bss[0]->num_deny_mac,
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set deny acl");
return;
}
}
}