[PATCH 4/9] WNM: Avoid staying on a BSS if it is being terminated
Jouni Malinen
j at w1.fi
Fri Oct 3 03:48:25 PDT 2025
On Fri, Jul 18, 2025 at 01:01:00PM +0200, Benjamin Berg wrote:
> If a BSS termination is included in a BTM request, then it makes sense
> to assume that the BSS is going to terminate even if disassociation
> imminent is not (yet) set.
What do you mean with "avoid staying on a BSS"? Aren't the changes here
impacting only selection of a candidate BSS to reassociate to and not
the current BSS, i.e., the current association would be continued even
if BSS termination information is included here?
The BSS Termination Duration information includes information about the
time when the termination will occur. That could indicate a time that is
far in the future. Maybe it would be better to check that value before
ruling out use of the BSS in the near term.
> diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
> @@ -1493,7 +1493,8 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
> - } else if (!disassoc_imminent) {
> + } else if (!disassoc_imminent &&
> + !(wpa_s->wnm_mode & WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED)) {
> enum bss_trans_mgmt_status_code status;
>
> /* No candidate list and disassociation is not imminent */
I guess that comment should be updated just like the other comment below
was..
> @@ -1949,10 +1950,12 @@ bool wnm_is_bss_excluded(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
> /*
> - * In case disassociation imminent is set, do no try to use a BSS to
> - * which we are connected.
> + * Do not try to use a BSS to which we are connected, if it is expected
> + * to disappear. Assume that will happen if DISASSOC_IMMINENT is set or
> + * BSS termination information was included.
> */
> - if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT) {
> + if (wpa_s->wnm_mode & WNM_BSS_TM_REQ_DISASSOC_IMMINENT ||
> + wpa_s->wnm_mode & WNM_BSS_TM_REQ_BSS_TERMINATION_INCLUDED) {
> if (!wpa_s->wnm_disassoc_mld) {
> if (ether_addr_equal(bss->bssid,
> wpa_s->wnm_disassoc_addr))
This is the change that impact candidate BSS selection (i.e., would now
exclude BSSs for which a report about BSS termination has been
received).
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list