Skip to contentSkip to conversation

nl80211: ignore the length of hide ssid is zero in scan

PATCH In review samirweng1979 2 participants 2 messages Jan 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nl80211: ignore the length of hide ssid is zero in scan

From: wengjianfeng <[email protected]>

If the length of hide ssid is zero in scan, don't pass it to driver, which doesn't make any sense.

---
 net/wireless/nl80211.c | 3 +++
 1 file changed, 3 insertions(+)
net/wireless/nl80211.c +3 -0
index 775d0c4..d62e2aa 100644
@@ -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));
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 4 lines · On Thu, 2021-01-28 at 19:56 +0800, samirweng1979 wrote:

From: wengjianfeng <[email protected]>

If the length of hide ssid is zero in scan, don't pass it to driver, which doesn't make any sense.

Err, please check again how scanning works. This is quite obviously intentional.

johannes