On 2019/11/08 17:56, Stefan Sperling wrote:
> 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?

OK with me.  ifconfig(8) will need an update, but I think this is probably 
enough.


Index: ifconfig.8
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.8,v
retrieving revision 1.342
diff -u -p -r1.342 ifconfig.8
--- ifconfig.8  20 Sep 2019 12:37:04 -0000      1.342
+++ ifconfig.8  8 Nov 2019 16:21:36 -0000
@@ -965,6 +965,8 @@ It doesn't affect the channel to be crea
 Add the network with NWID/ESSID
 .Ar id
 to the list of auto-join networks.
+The empty string allows the interface to connect to any available
+access point.
 Information about such networks is retained,
 such that configured interfaces can automatically switch to such networks
 as necessary.
@@ -1044,8 +1046,6 @@ Connect to the network with NWID
 .Ar id .
 Unlike auto-join networks,
 information about the network is not retained.
-The empty string allows the interface to connect to any available
-access points.
 May not be used with
 .Cm join .
 .It Cm -nwid


> 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