]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Always return NL_SKIP from survey dump handler
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Thu, 1 Jun 2023 10:02:26 +0000 (15:32 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 22 Jun 2023 14:28:38 +0000 (17:28 +0300)
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 <quic_vjakkam@quicinc.com>
src/drivers/driver_nl80211_scan.c

index 4d33b149d0ca7e44cdf29dbd6913caf4184835a6..461d688a4f01bcc012b7a89b82cf2663e86b4a95 100644 (file)
@@ -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);