How can I make wpa_supplicant
not connect to expressly disabled open networks when no configured network is available? (How can I make it not connect to anything whatsoever?)
This happens when my card fails to find my home network. In this case, wpa_supplicant
connects to any other available network, even disabled networks.
For example, my neighbour has an open network (SSID: xfinitywifi
) with a strong signal. This network is expressly disabled in my wpa_supplicant.conf
: (See this question also by me.)
network={
ssid="xfinitywifi"
key_mgmt=NONE
disabled=1
priority=0
}
This works most of the time. However, if my card happens not to find my home network, wpa_supplicant
then just ignores disabled=1
above, and connects to xfinitywifi
.
This can be shown from wpa_cli
output (reformatted):
> disconnect
OK
> list_networks
0 neighbour1 any [DISABLED]
1 xfinitywifi any [DISABLED]
2 neighbour2 any
---CUT---
12 neighbour12 any
13 any [CURRENT]
>
> reconnect
OK
<3>CTRL-EVENT-SCAN-RESULTS
<3>WPS-AP-AVAILABLE
<3>SME: Trying to authenticate with 06:1d:d3:4c:37:00 (SSID='xfinitywifi' freq=2447 MHz)
<3>Trying to associate with 06:1d:d3:4c:37:00 (SSID='xfinitywifi' freq=2447 MHz)
<3>Associated with 06:1d:d3:4c:37:00
<3>CTRL-EVENT-CONNECTED - Connection to 06:1d:d3:4c:37:00 completed (reauth) [id=13 id_str=]
Notice that #13 (any
) is the current network ([CURRENT]
), which turns out to be #1, xfinitywifi
, a disabled network ([DISABLED]
).