Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] adapter: Fix using case sensitive strncmp for pattern match addresses
@ 2026-06-04 17:19 Luiz Augusto von Dentz
  2026-06-04 18:11 ` [BlueZ,v1] " bluez.test.bot
  2026-06-04 18:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Luiz Augusto von Dentz @ 2026-06-04 17:19 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When matching discovery filter pattern with addresses shall be
considered case insensitive since its binary format that can be
printed using either upper or lower case for the range a-f/A-F.
---
 src/adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index 755c53119e32..9298eda8f3e0 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -7316,7 +7316,7 @@ static bool device_is_discoverable(struct btd_adapter *adapter,
 			return true;
 		}
 
-		if (!strncmp(filter->pattern, addr, pattern_len)) {
+		if (!strncasecmp(filter->pattern, addr, pattern_len)) {
 			*auto_connect = filter->auto_connect;
 			return true;
 		}
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-04 18:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 17:19 [PATCH BlueZ v1] adapter: Fix using case sensitive strncmp for pattern match addresses Luiz Augusto von Dentz
2026-06-04 18:11 ` [BlueZ,v1] " bluez.test.bot
2026-06-04 18:30 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox