}
-void hostapd_disassoc_accept_mac(struct hostapd_data *hapd)
+int hostapd_disassoc_accept_mac(struct hostapd_data *hapd)
{
struct sta_info *sta;
struct vlan_description vlan_id;
if (hapd->conf->macaddr_acl != DENY_UNLESS_ACCEPTED)
- return;
+ return 0;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (!hostapd_maclist_found(hapd->conf->accept_mac,
ap_sta_disconnect(hapd, sta, sta->addr,
WLAN_REASON_UNSPECIFIED);
}
+
+ return 0;
}
-void hostapd_disassoc_deny_mac(struct hostapd_data *hapd)
+int hostapd_disassoc_deny_mac(struct hostapd_data *hapd)
{
struct sta_info *sta;
struct vlan_description vlan_id;
ap_sta_disconnect(hapd, sta, sta->addr,
WLAN_REASON_UNSPECIFIED);
}
+
+ return 0;
}
int *num);
int hostapd_ctrl_iface_acl_show_mac(struct mac_acl_entry *acl, int num,
char *buf, size_t buflen);
-void hostapd_disassoc_accept_mac(struct hostapd_data *hapd);
-void hostapd_disassoc_deny_mac(struct hostapd_data *hapd);
+int hostapd_disassoc_accept_mac(struct hostapd_data *hapd);
+int hostapd_disassoc_deny_mac(struct hostapd_data *hapd);
#endif /* CTRL_IFACE_AP_H */
}
-static void hostapd_set_acl(struct hostapd_data *hapd)
+int hostapd_set_acl(struct hostapd_data *hapd)
{
struct hostapd_config *conf = hapd->iconf;
- int err;
+ int err = 0;
u8 accept_acl;
if (hapd->iface->drv_max_acl_mac_addrs == 0)
- return;
+ return 0;
if (conf->bss[0]->macaddr_acl == DENY_UNLESS_ACCEPTED) {
accept_acl = 1;
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set accept acl");
- return;
+ return -1;
}
} else if (conf->bss[0]->macaddr_acl == ACCEPT_UNLESS_DENIED) {
accept_acl = 0;
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set deny acl");
- return;
+ return -1;
}
}
+ return err;
}
struct fst_wpa_obj *iface_obj);
#endif /* CONFIG_FST */
+int hostapd_set_acl(struct hostapd_data *hapd);
+
#endif /* HOSTAPD_H */