From: Veerendranath Jakkam Date: Thu, 1 Jun 2023 10:02:26 +0000 (+0530) Subject: nl80211: Always return NL_SKIP from survey dump handler X-Git-Tag: hostap_2_11~1103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b233e9f0a30f14cbdb2b92c9712ef1e2f37b976;p=thirdparty%2Fhostap.git 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 --- 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);