From: Masafumi Utsugi Date: Tue, 29 Sep 2020 06:12:01 +0000 (+0900) Subject: hostapd: Report errors ACCEPT_ACL/DENY_ACL control interface commands X-Git-Tag: hostap_2_10~623 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f98fe2fd00c53137017f44fd25cfd8812a54f840;p=thirdparty%2Fhostap.git 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 --- diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c index 9fd55d6c5..5859d1605 100644 --- a/hostapd/ctrl_iface.c +++ b/hostapd/ctrl_iface.c @@ -3690,6 +3690,8 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd, &hapd->conf->accept_mac, &hapd->conf->num_accept_mac, buf + 19)) hostapd_disassoc_accept_mac(hapd); + else + reply_len = -1; } else if (os_strcmp(buf + 11, "SHOW") == 0) { reply_len = hostapd_ctrl_iface_acl_show_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->num_deny_mac, buf + 17)) hostapd_disassoc_deny_mac(hapd); + else + reply_len = -1; } else if (os_strncmp(buf + 9, "DEL_MAC ", 8) == 0) { - hostapd_ctrl_iface_acl_del_mac( - &hapd->conf->deny_mac, - &hapd->conf->num_deny_mac, buf + 17); + if (hostapd_ctrl_iface_acl_del_mac( + &hapd->conf->deny_mac, + &hapd->conf->num_deny_mac, buf + 17)) + reply_len = -1; } else if (os_strcmp(buf + 9, "SHOW") == 0) { reply_len = hostapd_ctrl_iface_acl_show_mac( hapd->conf->deny_mac,