提交 48225709 编写于 作者: M Michael Wu 提交者: John W. Linville

[PATCH] mac80211: Fix SSID matching in AP selection

The length of the SSID desired should also be compared in addition to
the memcmp of the SSIDs.

Thanks to Andrea Merello <andreamrl@tiscali.it> for finding this issue.
Signed-off-by: NMichael Wu <flamingice@sourmilk.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 c9927c2b
...@@ -2096,7 +2096,8 @@ static int ieee80211_sta_match_ssid(struct ieee80211_if_sta *ifsta, ...@@ -2096,7 +2096,8 @@ static int ieee80211_sta_match_ssid(struct ieee80211_if_sta *ifsta,
{ {
int tmp, hidden_ssid; int tmp, hidden_ssid;
if (!memcmp(ifsta->ssid, ssid, ssid_len)) if (ssid_len == ifsta->ssid_len &&
!memcmp(ifsta->ssid, ssid, ssid_len))
return 1; return 1;
if (ifsta->flags & IEEE80211_STA_AUTO_BSSID_SEL) if (ifsta->flags & IEEE80211_STA_AUTO_BSSID_SEL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册