Bluetooth: Don't send connection parameters without identity address
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 2 Jul 2014 14:37:34 +0000 (17:37 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Jul 2014 15:42:58 +0000 (17:42 +0200)
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>
net/bluetooth/mgmt.c

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