On Mon, Jan 13, 2020 at 10:38:35PM +0100, Peter Hessler wrote:
> On 2020 Jan 12 (Sun) at 21:39:19 +0100 (+0100), Peter Hessler wrote:
> :When we change attributes for a join essid, we should apply the change
> :immediately instead of waiting to (randomly) switch away and switch
> :back.
> 
> And if we are connected to an AP, remove the node from the cache so we
> can properly reconnect.
> 
> OK?
> 
> 
> Index: net80211/ieee80211_ioctl.c
> ===================================================================
> RCS file: /home/cvs/openbsd/src/sys/net80211/ieee80211_ioctl.c,v
> retrieving revision 1.78
> diff -u -p -u -p -r1.78 ieee80211_ioctl.c
> --- net80211/ieee80211_ioctl.c        13 Jan 2020 09:57:25 -0000      1.78
> +++ net80211/ieee80211_ioctl.c        13 Jan 2020 16:16:18 -0000
> @@ -543,7 +543,13 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon
>                       if (ic->ic_des_esslen == join.i_len &&
>                           memcmp(join.i_nwid, ic->ic_des_essid,
>                           join.i_len) == 0) {
> +                             struct ieee80211_node *ni;
> +
>                               ieee80211_deselect_ess(ic);
> +                             ni = ieee80211_find_node(ic,
> +                                 ic->ic_bss->ni_bssid);
> +                             if (ni != NULL)
> +                                     ieee80211_release_node(ic, ni);

This should call ieee80211_free_node() instead. We should also make
sure this code runs in station opmode (IEEE80211_M_STA) only.

>                               error = ENETRESET;
>                       }
>                       /* save nwid for auto-join */
> 

Reply via email to