From 9b233e9f0a30f14cbdb2b92c9712ef1e2f37b976 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Thu, 1 Jun 2023 15:32:26 +0530 Subject: [PATCH] nl80211: Always return NL_SKIP from survey dump handler Previously, NL_STOP was returned from the survey dump handler if the maximum number of frequencies was reached for storing survey information, but this is causing wpa_supplicant context getting stuck if the current SKB returned by the kernel itself ends with NLMSG_DONE type message. This is due to libnl immediately stopping processing the current SKB upon receiving NL_STOP and not being able to process NLMSG_DONE type message, and due to this wpa_supplicant's finish_handler() not getting called. Fix this by returning NL_SKIP instead while still ignoring all possible additional frequencies. Signed-off-by: Veerendranath Jakkam --- src/drivers/driver_nl80211_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/driver_nl80211_scan.c b/src/drivers/driver_nl80211_scan.c index 4d33b149d..461d688a4 100644 --- a/src/drivers/driver_nl80211_scan.c +++ b/src/drivers/driver_nl80211_scan.c @@ -41,7 +41,7 @@ static int get_noise_for_scan_results(struct nl_msg *msg, void *arg) struct nl80211_noise_info *info = arg; if (info->count >= MAX_NL80211_NOISE_FREQS) - return NL_STOP; + return NL_SKIP; nla_parse(tb, NL80211_ATTR_MAX, genlmsg_attrdata(gnlh, 0), genlmsg_attrlen(gnlh, 0), NULL); -- 2.47.2