From: Luiz Augusto von Dentz <[email protected]>
bt_ad_has_data attempts to match the data portion even when not set
which is useful the user is only interested in actually mataching the
type alone.
---
src/shared/ad.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/shared/ad.c b/src/shared/ad.c
index 27b76dc8179b..7350aa206d1e 100644
--- a/src/shared/ad.c
+++ b/src/shared/ad.c
@@ -1028,6 +1028,9 @@ static bool data_match(const void *data, const void *user_data)
if (d1->type != d2->type)
return false;
+ if (!d2->len && !d2->data)
+ return true;
+
if (d1->len != d2->len)
return false;
--
2.39.2