mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-14 06:38:29 +04:00
hostapd_bss_transition_request() left mbo_reason, cell_pref and reassoc_delay uninitialised and assigned them only when the caller named them, while hostapd_bss_tr_send() built the MBO attributes from all three unconditionally. A caller that names none of them, which is every caller that only wants a plain BTM Request, therefore had whatever the stack held validated and then written into the frame. Where the leftovers failed validation the request was refused with an invalid argument and no BTM Request frame was transmitted at all; where they passed, the frame carried a random transition reason and cellular preference. Which of the two happened varied between calls, so client steering failed intermittently with no diagnostic. Initialise the three, and build the attributes only when the caller asked for MBO. Name the cellular preference constants while touching the validation. Signed-off-by: Felix Fietkau <nbd@nbd.name>