Skip to content

Commit d568a04

Browse files
author
Johan Hedberg
committed
Bluetooth: GATT: Fix missing connection address comparison
When receiving notifications we should be properly matching against the remote address of subscribed peers. Change-Id: Ibcba1101aac418fd02f9068667f84e8294aade07 Signed-off-by: Johan Hedberg <[email protected]> (cherry picked from commit 883f91a7c7c534d812c7d5c2a1d340e0dab2b58a)
1 parent 8d8eb0d commit d568a04

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

subsys/bluetooth/host/gatt.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,10 @@ void bt_gatt_notification(struct bt_conn *conn, uint16_t handle,
712712
BT_DBG("handle 0x%04x length %u", handle, length);
713713

714714
for (params = subscriptions; params; params = params->_next) {
715+
if (bt_addr_le_cmp(&conn->le.dst, &params->_peer)) {
716+
continue;
717+
}
718+
715719
if (handle != params->value_handle) {
716720
continue;
717721
}

0 commit comments

Comments
 (0)