Never join a network if not explicitly configured.

The scanning still occurs so that the network list is populated. But if
no SSID has been explicitly configured, we now always set the
IEEE80211_SCAN_NOJOIN flag that prevents automatically joining open
networks at the end of the scan.
This commit is contained in:
Michael Lotz 2013-04-02 02:30:04 +02:00
parent 6e77a76ef9
commit 1b3dd41a35
1 changed files with 9 additions and 0 deletions

View File

@ -411,6 +411,15 @@ start_scan_locked(const struct ieee80211_scanner *scan,
, flags & IEEE80211_SCAN_ONCE ? ", once" : ""
);
#ifdef __HAIKU__
/* We never want to join if not explicitly looking for an SSID */
if (nssid == 0 && (flags & IEEE80211_SCAN_NOJOIN) == 0) {
IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN,
"%s: setting nojoin due to no configured ssid\n", __func__);
flags |= IEEE80211_SCAN_NOJOIN;
}
#endif
scan_update_locked(vap, scan);
if (ss->ss_ops != NULL) {
if ((flags & IEEE80211_SCAN_NOSSID) == 0)