[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210128115652.8564-1-samirweng1979@163.com>
Date: Thu, 28 Jan 2021 19:56:52 +0800
From: samirweng1979 <samirweng1979@....com>
To: johannes@...solutions.net, davem@...emloft.net, kuba@...nel.org
Cc: linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
wengjianfeng <wengjianfeng@...ong.com>
Subject: [PATCH] nl80211: ignore the length of hide ssid is zero in scan
From: wengjianfeng <wengjianfeng@...ong.com>
If the length of hide ssid is zero in scan, don't pass
it to driver, which doesn't make any sense.
Signed-off-by: wengjianfeng <wengjianfeng@...ong.com>
---
net/wireless/nl80211.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 775d0c4..d62e2aa 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -8727,6 +8727,9 @@ static int nl80211_abort_scan(struct sk_buff *skb, struct genl_info *info)
err = -EINVAL;
goto out_free;
}
+ /* ignore the length of hide ssid is zero */
+ if (nla_len(attr) == 0)
+ continue;
request->ssids[i].ssid_len = nla_len(attr);
memcpy(request->ssids[i].ssid, nla_data(attr),
nla_len(attr));
--
1.9.1
Powered by blists - more mailing lists