浏览代码

Bluetooth: Don't send connection parameters without identity address

If we don't have an identity address for connection parameters it
doesn't really make sense to send them to user space. Instead just
ignore them for now. Later we can add support for sending them when we
eventually get the identity through pairing.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Johan Hedberg 11 年之前
父节点
当前提交
c103aea6f7
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      net/bluetooth/mgmt.c

+ 3 - 0
net/bluetooth/mgmt.c

@@ -5795,6 +5795,9 @@ void mgmt_new_conn_param(struct hci_dev *hdev, bdaddr_t *bdaddr,
 {
 {
 	struct mgmt_ev_new_conn_param ev;
 	struct mgmt_ev_new_conn_param ev;
 
 
+	if (!hci_is_identity_address(bdaddr, bdaddr_type))
+		return;
+
 	memset(&ev, 0, sizeof(ev));
 	memset(&ev, 0, sizeof(ev));
 	bacpy(&ev.addr.bdaddr, bdaddr);
 	bacpy(&ev.addr.bdaddr, bdaddr);
 	ev.addr.type = link_to_bdaddr(LE_LINK, bdaddr_type);
 	ev.addr.type = link_to_bdaddr(LE_LINK, bdaddr_type);