if (os_strncmp(buf + 11, "ADD_MAC ", 8) == 0) {
if (hostapd_ctrl_iface_acl_add_mac(
&hapd->conf->accept_mac,
- &hapd->conf->num_accept_mac, buf + 19))
+ &hapd->conf->num_accept_mac, buf + 19) ||
+ hostapd_set_acl(hapd))
reply_len = -1;
} else if (os_strncmp((buf + 11), "DEL_MAC ", 8) == 0) {
- if (!hostapd_ctrl_iface_acl_del_mac(
+ if (hostapd_ctrl_iface_acl_del_mac(
&hapd->conf->accept_mac,
- &hapd->conf->num_accept_mac, buf + 19))
- hostapd_disassoc_accept_mac(hapd);
- else
+ &hapd->conf->num_accept_mac, buf + 19) ||
+ hostapd_set_acl(hapd) ||
+ hostapd_disassoc_accept_mac(hapd))
reply_len = -1;
} else if (os_strcmp(buf + 11, "SHOW") == 0) {
reply_len = hostapd_ctrl_iface_acl_show_mac(
hostapd_ctrl_iface_acl_clear_list(
&hapd->conf->accept_mac,
&hapd->conf->num_accept_mac);
- hostapd_disassoc_accept_mac(hapd);
+ if (hostapd_set_acl(hapd) ||
+ hostapd_disassoc_accept_mac(hapd))
+ reply_len = -1;
}
} else if (os_strncmp(buf, "DENY_ACL ", 9) == 0) {
if (os_strncmp(buf + 9, "ADD_MAC ", 8) == 0) {
- if (!hostapd_ctrl_iface_acl_add_mac(
+ if (hostapd_ctrl_iface_acl_add_mac(
&hapd->conf->deny_mac,
- &hapd->conf->num_deny_mac, buf + 17))
- hostapd_disassoc_deny_mac(hapd);
- else
+ &hapd->conf->num_deny_mac, buf + 17) ||
+ hostapd_set_acl(hapd) ||
+ hostapd_disassoc_deny_mac(hapd))
reply_len = -1;
} else if (os_strncmp(buf + 9, "DEL_MAC ", 8) == 0) {
if (hostapd_ctrl_iface_acl_del_mac(
&hapd->conf->deny_mac,
- &hapd->conf->num_deny_mac, buf + 17))
+ &hapd->conf->num_deny_mac, buf + 17) ||
+ hostapd_set_acl(hapd))
reply_len = -1;
} else if (os_strcmp(buf + 9, "SHOW") == 0) {
reply_len = hostapd_ctrl_iface_acl_show_mac(
hostapd_ctrl_iface_acl_clear_list(
&hapd->conf->deny_mac,
&hapd->conf->num_deny_mac);
+ if (hostapd_set_acl(hapd))
+ reply_len = -1;
}
#ifdef CONFIG_DPP
} else if (os_strncmp(buf, "DPP_QR_CODE ", 12) == 0) {
enum macaddr_acl acl_type);
int ap_ctrl_iface_disassoc_deny_mac(struct wpa_supplicant *wpa_s);
int ap_ctrl_iface_disassoc_accept_mac(struct wpa_supplicant *wpa_s);
+int ap_ctrl_iface_set_acl(struct wpa_supplicant *wpa_s);
void ap_tx_status(void *ctx, const u8 *addr,
const u8 *buf, size_t len, int ack);
void ap_eapol_tx_status(void *ctx, const u8 *dst,
if (os_strncmp(buf + 11, "ADD_MAC ", 8) == 0) {
if (ap_ctrl_iface_acl_add_mac(wpa_s,
DENY_UNLESS_ACCEPTED,
- buf + 19))
+ buf + 19) ||
+ ap_ctrl_iface_set_acl(wpa_s))
reply_len = -1;
} else if (os_strncmp((buf + 11), "DEL_MAC ", 8) == 0) {
if (ap_ctrl_iface_acl_del_mac(wpa_s,
DENY_UNLESS_ACCEPTED,
buf + 19) ||
+ ap_ctrl_iface_set_acl(wpa_s) ||
ap_ctrl_iface_disassoc_accept_mac(wpa_s))
reply_len = -1;
} else if (os_strcmp(buf + 11, "SHOW") == 0) {
} else if (os_strcmp(buf + 11, "CLEAR") == 0) {
ap_ctrl_iface_acl_clear_list(wpa_s,
DENY_UNLESS_ACCEPTED);
- if (ap_ctrl_iface_disassoc_accept_mac(wpa_s))
+ if (ap_ctrl_iface_set_acl(wpa_s) ||
+ ap_ctrl_iface_disassoc_accept_mac(wpa_s))
reply_len = -1;
} else {
reply_len = -1;
if (ap_ctrl_iface_acl_add_mac(wpa_s,
ACCEPT_UNLESS_DENIED,
buf + 17) ||
+ ap_ctrl_iface_set_acl(wpa_s) ||
ap_ctrl_iface_disassoc_deny_mac(wpa_s))
reply_len = -1;
} else if (os_strncmp(buf + 9, "DEL_MAC ", 8) == 0) {
if (ap_ctrl_iface_acl_del_mac(wpa_s,
ACCEPT_UNLESS_DENIED,
- buf + 17))
+ buf + 17) ||
+ ap_ctrl_iface_set_acl(wpa_s))
reply_len = -1;
} else if (os_strcmp(buf + 9, "SHOW") == 0) {
reply_len = ap_ctrl_iface_acl_show_mac(
} else if (os_strcmp(buf + 9, "CLEAR") == 0) {
ap_ctrl_iface_acl_clear_list(wpa_s,
ACCEPT_UNLESS_DENIED);
+ if (ap_ctrl_iface_set_acl(wpa_s))
+ reply_len = -1;
} else {
reply_len = -1;
}