]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix BSS parameters change count on link removal
authorJohannes Berg <johannes.berg@intel.com>
Wed, 24 Jul 2024 17:37:07 +0000 (19:37 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 1 Aug 2024 14:30:12 +0000 (17:30 +0300)
The value currently is simply incremented, but it must not
reach 255 and rather wrap around from 254 to 0, since in
the Reduced Neighbor Report 255 means unknown. Fix that.

Fixes: d95838b7932b ("AP: Add support for testing ML link removal")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
src/ap/hostapd.c

index a05de030d91f5eee65a37166afe064d8946cb6b2..a0ac3a857823413737fbd126b12ac330cd35f824 100644 (file)
@@ -440,6 +440,8 @@ int hostapd_link_remove(struct hostapd_data *hapd, u32 count)
 
        hapd->eht_mld_link_removal_count = count;
        hapd->eht_mld_bss_param_change++;
+       if (hapd->eht_mld_bss_param_change == 255)
+               hapd->eht_mld_bss_param_change = 0;
 
        eloop_register_timeout(0, TU_TO_USEC(hapd->iconf->beacon_int),
                               hostapd_link_remove_timeout_handler,