The default wifi interface behaviour of connecting to any open network
when nothing is configured is confusing people who have gotten used to
the behaviour of ifconfig join.

With this diff connecting to any open network on 'ifconfg iwm0 up' requires
the user to run ifconfig iwm0 join "" first. Otherwise, only explicitly
configured network SSIDs will be used.

This also allows users to scan for available access points without sending
out probe, auth, or association requests to random accces points.

ok?

diff refs/heads/master refs/heads/no-assoc-any
blob - 41530d2a311e1dbc2c0e70f95a14c360e9f981d6 (mode 644)
blob + bc6a604c33daf297800f2f36dfae23c03d2dfb9d (mode 600)
--- sys/net80211/ieee80211_node.c
+++ sys/net80211/ieee80211_node.c
@@ -1038,8 +1038,7 @@ ieee80211_match_bss(struct ieee80211com *ic, struct ie
        rate = ieee80211_fix_rate(ic, ni, IEEE80211_F_DONEGO);
        if (rate & IEEE80211_RATE_BASIC)
                fail |= IEEE80211_NODE_ASSOCFAIL_BASIC_RATE;
-       if (ISSET(ic->ic_flags, IEEE80211_F_AUTO_JOIN) &&
-           ic->ic_des_esslen == 0)
+       if (ic->ic_des_esslen == 0)
                fail |= IEEE80211_NODE_ASSOCFAIL_ESSID;
        if (ic->ic_des_esslen != 0 &&
            (ni->ni_esslen != ic->ic_des_esslen ||



Reply via email to