]> git.ipfire.org Git - thirdparty/hostap.git/commit
Fix BSS age underflow
authorKrishna T <krishna.t@nordicsemi.no>
Mon, 9 Jan 2023 20:09:10 +0000 (01:39 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 1 Feb 2023 16:30:27 +0000 (18:30 +0200)
commit12de8112b763dc8086915aac8c13e2e99e3aef96
tree6342ed5bc370c7cc6ffb32e696fae3bbee780813
parent047da5fe3a682830f8cf0d8fb23e97bc3160a283
Fix BSS age underflow

While checking for stale BSSes, the current time is used as a basis and
then based on age the stale check time is calculated, but if this is
done too early in the boot and if either BOOTTIME/MONOTONIC (the one
Zephyr uses by default) are used then the stale check time underflows
and goes to future causing active BSS entries in the scan to be treated
as stale and flushed.

Fix this by adding a check before calculating stale time and ignore this
check till the system reaches the BSS expiration time (this would never
happen with REALTIME clock).

Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Signed-off-by: Sridhar Nuvusetty <sridhar.nuvusetty@nordicsemi.no>
wpa_supplicant/bss.c