diff --git a/net/bluetooth/conn.c b/net/bluetooth/conn.c index 5f13e3a947f..b6dd8314a34 100644 --- a/net/bluetooth/conn.c +++ b/net/bluetooth/conn.c @@ -378,6 +378,10 @@ struct bt_conn *bt_conn_lookup_state(const bt_addr_le_t *peer, int i; for (i = 0; i < ARRAY_SIZE(conns); i++) { + if (!bt_addr_le_cmp(&conns[i].dst, BT_ADDR_LE_ANY)) { + continue; + } + if (bt_addr_le_cmp(peer, BT_ADDR_LE_ANY) && bt_addr_le_cmp(peer, &conns[i].dst)) { continue;