On Mon, Jun 20, 2022 at 11:41:05PM +0100, Julian Smith wrote:
> Recently i got really confused after removing a 'join <ID> ... ' line
> from /etc/hostname.iwn0, then running `sh /etc/netstart`. This resulted
> in reconnection to <ID>, even though <ID> was now not mentioned
> anywhere in /etc/hostname.iwn0.
> 
> Even `ifconfig iwn0 down up` did not change this behaviour.
> 
> It turned out that i needed to do `ifconfig iwn0 down -joinlist up` to remove
> all networks from the join list, as described in ifconfig(8). [I'm not
> actually sure that the `down` and `up` are necessary.]
> 
> Would it be possible and make sense to have /etc/netstart do this
> automatically for wireless interfaces? Or am i misunderstanding what
> /etc/netstart is for?

You could add the following as the first line of hostname.if if you
would like netstart to clear out existing networks before adding new
ones:

-joinlist

Reply via email to