aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-07-24 09:20:58 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-26 07:13:19 -0400
commit66d8e837ab4f58722c56ccbfa5ab9a522cebde78 (patch)
tree98e032b8f9aee078b93817a44e52a76c4239d595 /net/bluetooth/hci_core.c
parent8540f6c0364722b141547c6c7ac366c3ea77390b (diff)
Bluetooth: Fix white list handling with resolvable private addresses
Devices using resolvable private addresses are required to provide an identity resolving key. These devices can not be found using the current controller white list support. This means if the kernel knows about any devices with an identity resolving key, the white list filtering must be disabled. However so far the kernel kept identity resolving keys around even for devices that are not using resolvable private addresses. The notification to userspace clearly hints to not store the key and so it is best to just remove the key from the kernel as well at that point. With this it easy now to detect when using the white list is possible or when kernel side resolving of addresses is required. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ecff30ab22a0..2e2961a3cf6f 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -5468,6 +5468,12 @@ static u8 update_white_list(struct hci_request *req)
5468 return 0x00; 5468 return 0x00;
5469 } 5469 }
5470 5470
5471 if (hci_find_irk_by_addr(hdev, &params->addr,
5472 params->addr_type)) {
5473 /* White list can not be used with RPAs */
5474 return 0x00;
5475 }
5476
5471 white_list_entries++; 5477 white_list_entries++;
5472 add_to_white_list(req, params); 5478 add_to_white_list(req, params);
5473 } 5479 }
@@ -5486,6 +5492,12 @@ static u8 update_white_list(struct hci_request *req)
5486 return 0x00; 5492 return 0x00;
5487 } 5493 }
5488 5494
5495 if (hci_find_irk_by_addr(hdev, &params->addr,
5496 params->addr_type)) {
5497 /* White list can not be used with RPAs */
5498 return 0x00;
5499 }
5500
5489 white_list_entries++; 5501 white_list_entries++;
5490 add_to_white_list(req, params); 5502 add_to_white_list(req, params);
5491 } 5503 }