]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: ubus: fix beacon request reporting detail field size
authorFelix Fietkau <nbd@nbd.name>
Wed, 18 Mar 2026 15:58:52 +0000 (15:58 +0000)
committerFelix Fietkau <nbd@nbd.name>
Thu, 19 Mar 2026 09:57:07 +0000 (10:57 +0100)
The Reporting Detail value is a 1-byte field, but was written as le16,
producing a 2-byte write that also contradicts the length field of 1
in the subelement header.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/network/services/hostapd/src/src/ap/ubus.c

index 1a5b29ed9ae1acce558ab0c9822d81197b09d9c4..8e27606816ffe650be1e1d1b567e5a910f223038 100644 (file)
@@ -1248,7 +1248,7 @@ hostapd_rrm_beacon_req(struct ubus_context *ctx, struct ubus_object *obj,
                /* as per 9-104 */
                wpabuf_put_u8(req, 2);
                wpabuf_put_u8(req, 1);
-               wpabuf_put_le16(req, reporting_detail);
+               wpabuf_put_u8(req, reporting_detail);
        }
 
        ret = hostapd_send_beacon_req(hapd, addr, 0, req);