From f02f6680d48a2b4fd8e8999d2bb1168e784ec517 Mon Sep 17 00:00:00 2001 From: Aleti Nageshwar Reddy Date: Mon, 26 Jul 2021 09:11:50 +0530 Subject: wpa_supplicant_8_lib: Reject getstainfo command on non-hapd iface This commit enhances getstainfo command to reject the request if it is not sent on hapd interface. Change-Id: I50925aa01930795e1d7226021173f179a8f4d4ca CRs-Fixed: 2999517 --- qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c index bb0ff98..48538ff 100644 --- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -1874,6 +1874,11 @@ static int wpa_driver_get_all_sta_info(struct i802_bss *bss, int *status) struct sta_info *sta; int ret, total_ret = 0; + if(bss->drv && bss->drv->nlmode != NL80211_IFTYPE_AP) { + wpa_printf(MSG_ERROR,"Not a hapd interface"); + return -1; + } + if (!hapd) { wpa_printf(MSG_ERROR,"hapd is NULL"); return -1; -- cgit v1.2.3