Skip to contentSkip to conversation

monitor: Print data if LTV and data length don't match

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Oct 22, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 monitor: Print data if LTV and data length don't match

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

If data length and LTV don't match this should be made visible so issues like the data coming as all zeros as bellow can be detected:

Quoted 1 line

HCI Event: LE Meta Event (0x3e) plen 50

      LE Periodic Advertising Report (0x0f)
        Sync handle: 64
        TX power: 127 dbm (0x7f)
        RSSI: -55 dBm (0xc9)
        CTE Type: No Constant Tone Extension (0xff)
        Data status: Complete
        Data length: 0x2a

Versus:

Quoted 1 line

HCI Event: LE Meta Event (0x3e) plen 50

      LE Periodic Advertising Report (0x0f)
        Sync handle: 64
        TX power: 127 dbm (0x7f)
        RSSI: -55 dBm (0xc9)
        CTE Type: No Constant Tone Extension (0xff)
        Data status: Complete
        Data length: 0x2a
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
        00 00 00 00 00 00 00 00 00 00                    ..........
---
 monitor/packet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
monitor/packet.c +1 -1
index dd808deaa79f..22708689fe03 100644
@@ -4133,7 +4133,7 @@ static void print_eir(const uint8_t *eir, uint8_t eir_len, bool le)
 		eir += field_len + 1;
 	}
 
-	if (len < eir_len && eir[0] != 0)
+	if (len < eir_len)
 		packet_hexdump(eir, eir_len - len);
 }
 
Signature · 1 line
2.51.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=1014654

---Test result---

Test Summary:

CheckPatch                    PENDING   0.36 seconds
GitLint                       PENDING   0.29 seconds
BuildEll                      PASS      20.04 seconds
BluezMake                     PASS      2703.51 seconds
MakeCheck                     PASS      20.23 seconds
MakeDistcheck                 PASS      186.25 seconds
CheckValgrind                 PASS      237.37 seconds
CheckSmatch                   WARNING   309.92 seconds
bluezmakeextell               PASS      129.23 seconds
IncrementalBuild              PENDING   0.34 seconds
ScanBuild                     PASS      918.32 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
monitor/packet.c: note: in included file:monitor/display.h:82:26: warning: Variable length array is used.monitor/packet.c:1931:26: warning: Variable length array is used.monitor/packet.c: note: in included file:monitor/bt.h:3837:52: warning: array of flexible structures
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:

---
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 14 lines · On Wed, 22 Oct 2025 14:00:44 -0400 you wrote:

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

If data length and LTV don't match this should be made visible so issues like the data coming as all zeros as bellow can be detected:

Quoted 1 line

HCI Event: LE Meta Event (0x3e) plen 50

      LE Periodic Advertising Report (0x0f)
        Sync handle: 64
        TX power: 127 dbm (0x7f)
        RSSI: -55 dBm (0xc9)
        CTE Type: No Constant Tone Extension (0xff)
        Data status: Complete
        Data length: 0x2a
Quoted 1 line

[...]

Here is the summary with links:
- [BlueZ,v1] monitor: Print data if LTV and data length don't match

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=9faf1244a932

You are awesome, thank you!

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