hostapd: Report errors ACCEPT_ACL/DENY_ACL control interface commands

Return FAIL for couple of the operations that were previously ignoring
invalid addresses without reporting errors.

Signed-off-by: Masafumi Utsugi <mutsugi@allied-telesis.co.jp>
This commit is contained in:
Masafumi Utsugi 2020-09-29 15:12:01 +09:00 committed by Jouni Malinen
parent 15251c6584
commit f98fe2fd00

View file

@ -3690,6 +3690,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
&hapd->conf->accept_mac, &hapd->conf->accept_mac,
&hapd->conf->num_accept_mac, buf + 19)) &hapd->conf->num_accept_mac, buf + 19))
hostapd_disassoc_accept_mac(hapd); hostapd_disassoc_accept_mac(hapd);
else
reply_len = -1;
} else if (os_strcmp(buf + 11, "SHOW") == 0) { } else if (os_strcmp(buf + 11, "SHOW") == 0) {
reply_len = hostapd_ctrl_iface_acl_show_mac( reply_len = hostapd_ctrl_iface_acl_show_mac(
hapd->conf->accept_mac, hapd->conf->accept_mac,
@ -3706,10 +3708,13 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
&hapd->conf->deny_mac, &hapd->conf->deny_mac,
&hapd->conf->num_deny_mac, buf + 17)) &hapd->conf->num_deny_mac, buf + 17))
hostapd_disassoc_deny_mac(hapd); hostapd_disassoc_deny_mac(hapd);
else
reply_len = -1;
} else if (os_strncmp(buf + 9, "DEL_MAC ", 8) == 0) { } else if (os_strncmp(buf + 9, "DEL_MAC ", 8) == 0) {
hostapd_ctrl_iface_acl_del_mac( if (hostapd_ctrl_iface_acl_del_mac(
&hapd->conf->deny_mac, &hapd->conf->deny_mac,
&hapd->conf->num_deny_mac, buf + 17); &hapd->conf->num_deny_mac, buf + 17))
reply_len = -1;
} else if (os_strcmp(buf + 9, "SHOW") == 0) { } else if (os_strcmp(buf + 9, "SHOW") == 0) {
reply_len = hostapd_ctrl_iface_acl_show_mac( reply_len = hostapd_ctrl_iface_acl_show_mac(
hapd->conf->deny_mac, hapd->conf->deny_mac,