On Wed, May 27, 2020 at 07:54:32AM +0000, Mikolaj Kucharski wrote:
> On Wed, May 27, 2020 at 09:31:00AM +0200, Stefan Sperling wrote:
> > > Uptime of 3h37m with following two entries (from dmesg):
> >
> > So this uptime is a lot better than what you saw before?
>
> I actually cannot compare is it better or not. This PC Engines machine
> runs -current and I upgrade it very regularly. Uptime below a week is
> normnal. Uptime of 30+ days would be probably because I'm traveling and
> I don't want to do remote upgrades. With COVID-19 I'm not really
> traveling these days, so no long uptimes for that box.
At the time of writing this email access point has 36 hrs of uptime and
I was not able to trigger kernel panic, nor XXX messages showed up in
dmesg with the latest version of the diff (int rekeysta = 0).
As I cannot repro the panic, I guess for now I don't have anything more
to add to this thread, except that your diff works, Stefan.
I can trigger athn device timeouts, but this looks like a different
issue, so I may start new thread about it, but for now I need to think
how to collect anything useful for this problem, because except dmesg
messages I don't have anything else about the problem.
> > The patch I sent had a small bug. It added an uninitialized variable at
> > the top ieee80211_setkeys(). Please change:
> >
> > int rekeysta;
> >
> > to this:
> >
> > int rekeysta = 0;
>
> Sure will recompile and run new kernel again, with my printf().
>
>
> > As in shown in this new patch.
> >
> > diff fb4b0a9b3955c9a65ddbc22c472ac0e5fb216ac6 /usr/src
> > blob - b44405af41448849059a4558c55bd182f823c1df
> > file + sys/net80211/ieee80211_proto.c
> > --- sys/net80211/ieee80211_proto.c
> > +++ sys/net80211/ieee80211_proto.c
> > @@ -433,6 +433,7 @@ ieee80211_setkeys(struct ieee80211com *ic)
> > {
> > struct ieee80211_key *k;
> > u_int8_t kid;
> > + int rekeysta = 0;
> >
> > /* Swap(GM, GN) */
> > kid = (ic->ic_def_txkey == 1) ? 2 : 1;
> > @@ -457,6 +458,9 @@ ieee80211_setkeys(struct ieee80211com *ic)
> > }
> >
> > ieee80211_iterate_nodes(ic, ieee80211_node_gtk_rekey, ic);
> > + ieee80211_iterate_nodes(ic, ieee80211_count_rekeysta, &rekeysta);
> > + if (rekeysta == 0)
> > + ieee80211_setkeysdone(ic);
> > }
> >
> > /*
> > @@ -466,6 +470,12 @@ void
> > ieee80211_setkeysdone(struct ieee80211com *ic)
> > {
> > u_int8_t kid;
> > +
> > + /*
> > + * Discard frames buffered for power-saving which were encrypted with
> > + * the old group key. Clients are no longer able to decrypt them.
> > + */
> > + mq_purge(&ic->ic_bss->ni_savedq);
> >
> > /* install GTK */
> > kid = (ic->ic_def_txkey == 1) ? 2 : 1;
>
--
Regards,
Mikolaj