I have a T400 Thinkpad with OpenBSD 6.4-stable, which is my daily driver and connects to internet over wifi.
Sometimes when I'm at home and boot my laptop, it automatically connects to neighbor's (unsecured) wifi hotspot:
Code:
$ ifconfig athn0
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
...
ieee80211: nwid xfinity chan...
I never want the laptop to connect to this hotspot! How do I prevent it from doing so? I want it to only connect using join (not nwid) to one of the hotspots in my /etc/hostname.athn0, which looks like this:
Code:
join homeSweetHome wpakey somePasSword
join AndroidAP wpakey otHerPassWord
join passwordlessCafe
dhcp
Output of ifconfig(8) joinlist confirms that neighbor's hotspot ("xfinity") is
not on the list:
Code:
bruno@thinkpad:~355$ ifconfig athn0 joinlist
athn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
lladdr 00:26:b6:eb:9d:23
index 2 priority 4 llprio 3
groups: wlan egress
media: IEEE802.11 autoselect (OFDM18 mode 11g)
status: active
ieee80211: join passwordlessCafe chan 6 bssid 88:f0:77:85:5e:b5 -66dBm
join: homeSweetHome
AndroidAP
passwordlessCafe
inet 10.1.72.144 netmask 0xffffe000 broadcast 10.1.95.255
I'm very puzzled by this behavior. Any ideas why sometimes I'm automatically connected to neighbor's hotspot? I know having multiple join statements in hostname.if(5) is a new feature. Am I experiencing a bug? If not, how do I tell the system to automatically connect
only to the hotspots listed in hostname.if(5)?
P.S. I can't seem to find any mention of a hotspot "blacklist". A workaround would be to disable connection attempts using ifconfig(8)'s "nwid" option, so that ifconfig is forced to use "join".