[PATCH] Fix BSS age underflow

Johannes Berg johannes at sipsolutions.net
Tue Jan 10 12:29:57 PST 2023


On Tue, 2023-01-10 at 22:43 +0530, Krishna Chaitanya wrote:
> 
> > But I think there are probably more cases? Maybe we need some kind of
> > helper for the actual check, something like "check_age(item_ts, now_ts,
> > age)"?
> Sure, but this patch should work with most clock_id's, only case I can think
> of is, time jumps in the case of REALTIME, but I guess that affects most callers
> that use os_reltime_before?
> 
> In which case I would suggest using MONOTONIC os_get_rel_time or adding a
> new APIs os_get_montime or passing clock_id to os_get_rel_time?

Oh no, I just meant there might be other cases of doing subtractions? A
quick grep suggested there might be, but now looking at it it seems they
might not be, so not sure.

johannes



More information about the Hostap mailing list