wlan-ap-Telecominfraproject/feeds/wifi-ax/hostapd/patches/f00-001-hostapd-Fix-calling-hostapd_disassoc_accept_mac-in-CLI.patch
John Crispin 528a778e38 open-converged-wireless: Import 21.02 based uCentral tree
Signed-off-by: John Crispin <john@phrozen.org>
2021-03-25 12:19:47 +01:00

47 lines
1.7 KiB
Diff

From aa394e37a56eaed0a575b8a1a34ebc31ca06af42 Mon Sep 17 00:00:00 2001
From: Nishant Pandey <nishpand@codeaurora.org>
Date: Tue, 22 Sep 2020 14:07:05 +0530
Subject: [PATCH] hostapd: Fix calling hostapd_disassoc_accept_mac in CLI
command
Calling hostapd_disassoc_accept_mac is not needed when we add mac
address to accept list and it is required to be called when any of
the mac address is deleted from accept mac list
Signed-off-by: Nishant Pandey <nishpand@codeaurora.org>
---
hostapd/ctrl_iface.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index 584aee2..66c63a0 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -3709,16 +3709,16 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
eloop_terminate();
} else if (os_strncmp(buf, "ACCEPT_ACL ", 11) == 0) {
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))
+ hostapd_ctrl_iface_acl_add_mac(
+ &hapd->conf->accept_mac,
+ &hapd->conf->num_accept_mac, buf + 19);
+ } else if (os_strncmp((buf + 11), "DEL_MAC ", 8) == 0) {
+ if (!hostapd_ctrl_iface_acl_del_mac(
+ &hapd->conf->accept_mac,
+ &hapd->conf->num_accept_mac, buf + 19))
hostapd_disassoc_accept_mac(hapd);
else
reply_len = -1;
- } else if (os_strncmp((buf + 11), "DEL_MAC ", 8) == 0) {
- hostapd_ctrl_iface_acl_del_mac(
- &hapd->conf->accept_mac,
- &hapd->conf->num_accept_mac, buf + 19);
} else if (os_strcmp(buf + 11, "SHOW") == 0) {
reply_len = hostapd_ctrl_iface_acl_show_mac(
hapd->conf->accept_mac,
--
2.7.4