Skip to contentSkip to conversation

advertising: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Jun 2 – Jun 3 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 advertising: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA

From: Luiz Augusto von Dentz <[email protected]>

MGMT_OP_ADD_EXT_ADV_DATA expects the command to be of size of struct mgmt_cp_add_ext_adv_data not mgmt_cp_add_advertising.

---
 src/advertising.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
src/advertising.c +1 -2
index c8b00a887911..1ed09c902b4b 100644
@@ -1498,8 +1498,7 @@ static void add_adv_params_callback(uint8_t status, uint16_t length,
 		}
 	}
 
-	param_len = sizeof(struct mgmt_cp_add_advertising) + adv_data_len +
-							scan_rsp_len;
+	param_len = sizeof(*cp) + adv_data_len + scan_rsp_len;
 
 	cp = malloc0(param_len);
 	if (!cp) {
Signature · 1 line
2.54.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1104846

---Test result---

Test Summary:

CheckPatch                    PASS      2.26 seconds
GitLint                       PASS      0.37 seconds
BuildEll                      PASS      20.58 seconds
BluezMake                     PASS      696.31 seconds
CheckSmatch                   WARNING   355.44 seconds
bluezmakeextell               PASS      182.82 seconds
IncrementalBuild              PASS      668.57 seconds
ScanBuild                     PASS      1026.46 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
src/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capabilitysrc/advertising.c: note: in included file:./src/shared/mgmt.h:95:25: error: redefinition of unsigned int enum mgmt_io_capability

https://github.com/bluez/bluez/pull/2167

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 7 lines · On Tue, 2 Jun 2026 16:47:49 -0400 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

MGMT_OP_ADD_EXT_ADV_DATA expects the command to be of size of struct mgmt_cp_add_ext_adv_data not mgmt_cp_add_advertising.

---
 src/advertising.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Here is the summary with links:
- [BlueZ,v1] advertising: Fix sending extra bytes with MGMT_OP_ADD_EXT_ADV_DATA

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=2a6968b40378

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html