On Tue, Sep 30, 2014 at 07:59:04AM -0400, sven falempin wrote:
>  If openBSD auto connect to <open wireless spot> I will have to patch the 
> kernel
> to use it.
> Auto connection to hotspot, especially the 'open' one is the worse thing ever.

You need to bring the wifi interface up first, manually or via
/etc/hostname.if. By default the interface is down.

If you are bringing an interface up, you're telling the kernel
that you want link on it. Of course, we could stop connecting
to the strongest open network and always require users to type
an nwid before they get link. But that can be annoying in cases
where you don't know which network has the best signal.
But the kernel can tell. I used this feature just last weekend at
eurobsdcon which had 2 wifi networks, where one or the other was
better depending on where I was sitting.

So instead of patching the kernel, I'd suggest you run:

ifconfig iwn0 down # default state after boot
ifconfig iwn0 scan
ifconfig iwn0 nwid foo
ifconfig iwn0 up   # or: dhclient iwn0

This gives you the behaviour you want.
As long as you don't run "ifconfig iwn0 -nwid" you'll never connect
to a network of a different name.

However, whether the AP you're naming is actually the one you're
connecting to is a different question and that problem can't be
solved with a kernel patch ;-) Unless perhaps if you changed the
laws of physics, or made WPA enterprise mandatory everywhere, both
of which seem somewhat unlikely options.

Reply via email to