Commit d568a04f authored by Johan Hedberg's avatar Johan Hedberg
Browse files

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: default avatarJohan Hedberg <johan.hedberg@intel.com>
(cherry picked from commit 883f91a7c7c534d812c7d5c2a1d340e0dab2b58a)
parent 8d8eb0d8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -712,6 +712,10 @@ void bt_gatt_notification(struct bt_conn *conn, uint16_t handle,
	BT_DBG("handle 0x%04x length %u", handle, length);

	for (params = subscriptions; params; params = params->_next) {
		if (bt_addr_le_cmp(&conn->le.dst, &params->_peer)) {
			continue;
		}

		if (handle != params->value_handle) {
			continue;
		}