]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
hostapd: ubus: fix parent-tsf size in beacon report notification
authorFelix Fietkau <nbd@nbd.name>
Thu, 19 Mar 2026 09:38:36 +0000 (09:38 +0000)
committerFelix Fietkau <nbd@nbd.name>
Thu, 19 Mar 2026 09:57:26 +0000 (10:57 +0100)
parent_tsf in struct rrm_measurement_beacon_report is le32 (32-bit),
but was being added with blobmsg_add_u16, truncating the value.

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

index bd35f797aed516f73a52e7cc541487ffb27fe9c9..514f56eebd7d87ab85e7352fc23168ab7c464eb5 100644 (file)
@@ -2029,7 +2029,7 @@ void hostapd_ubus_notify_beacon_report(
        blobmsg_add_u16(&b, "rsni", rep->rsni);
        blobmsg_add_macaddr(&b, "bssid", rep->bssid);
        blobmsg_add_u16(&b, "antenna-id", rep->antenna_id);
-       blobmsg_add_u16(&b, "parent-tsf", rep->parent_tsf);
+       blobmsg_add_u32(&b, "parent-tsf", rep->parent_tsf);
        blobmsg_add_u16(&b, "rep-mode", rep_mode);
        encoded = base64_encode(rep, len, NULL);
        if (encoded) {