Szymon Janc
b0a2a2b20b
Bluetooth: Fix connection if directed advertising and privacy is used
commit 082f2300cfa1a3d9d5221c38c5eba85d4ab98bd8 upstream.
Local random address needs to be updated before creating connection if
RPA from LE Direct Advertising Report was resolved in host. Otherwise
remote device might ignore connection request due to address mismatch.
This was affecting following qualification test cases:
GAP/CONN/SCEP/BV-03-C, GAP/CONN/GCEP/BV-05-C, GAP/CONN/DCEP/BV-05-C
Before patch:
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #11350 [hci0] 84680.231216
Address: 56:BC:E8:24:11:68 (Resolvable)
Identity type: Random (0x01)
Identity: F2:F1:06:3D:9C:42 (Static)
> HCI Event: Command Complete (0x0e) plen 4 #11351 [hci0] 84680.246022
LE Set Random Address (0x08|0x0005) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #11352 [hci0] 84680.246417
Type: Passive (0x00)
Interval: 60.000 msec (0x0060)
Window: 30.000 msec (0x0030)
Own address type: Random (0x01)
Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4 #11353 [hci0] 84680.248854
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11354 [hci0] 84680.249466
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 #11355 [hci0] 84680.253222
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18 #11356 [hci0] 84680.458387
LE Direct Advertising Report (0x0b)
Num reports: 1
Event type: Connectable directed - ADV_DIRECT_IND (0x01)
Address type: Random (0x01)
Address: 53:38:DA:46:8C:45 (Resolvable)
Identity type: Public (0x00)
Identity: 11:22:33:44:55:66 (OUI 11-22-33)
Direct address type: Random (0x01)
Direct address: 7C:D6:76:8C:DF:82 (Resolvable)
Identity type: Random (0x01)
Identity: F2:F1:06:3D:9C:42 (Static)
RSSI: -74 dBm (0xb6)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #11357 [hci0] 84680.458737
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4 #11358 [hci0] 84680.469982
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 #11359 [hci0] 84680.470444
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Filter policy: White list is not used (0x00)
Peer address type: Random (0x01)
Peer address: 53:38:DA:46:8C:45 (Resolvable)
Identity type: Public (0x00)
Identity: 11:22:33:44:55:66 (OUI 11-22-33)
Own address type: Random (0x01)
Min connection interval: 30.00 msec (0x0018)
Max connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4 #11360 [hci0] 84680.474971
LE Create Connection (0x08|0x000d) ncmd 1
Status: Success (0x00)
< HCI Command: LE Create Connection Cancel (0x08|0x000e) plen 0 #11361 [hci0] 84682.545385
> HCI Event: Command Complete (0x0e) plen 4 #11362 [hci0] 84682.551014
LE Create Connection Cancel (0x08|0x000e) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19 #11363 [hci0] 84682.551074
LE Connection Complete (0x01)
Status: Unknown Connection Identifier (0x02)
Handle: 0
Role: Master (0x00)
Peer address type: Public (0x00)
Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
Connection interval: 0.00 msec (0x0000)
Connection latency: 0 (0x0000)
Supervision timeout: 0 msec (0x0000)
Master clock accuracy: 0x00
After patch:
< HCI Command: LE Set Scan Parameters (0x08|0x000b) plen 7 #210 [hci0] 667.152459
Type: Passive (0x00)
Interval: 60.000 msec (0x0060)
Window: 30.000 msec (0x0030)
Own address type: Random (0x01)
Filter policy: Accept all advertisement, inc. directed unresolved RPA (0x02)
> HCI Event: Command Complete (0x0e) plen 4 #211 [hci0] 667.153613
LE Set Scan Parameters (0x08|0x000b) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #212 [hci0] 667.153704
Scanning: Enabled (0x01)
Filter duplicates: Enabled (0x01)
> HCI Event: Command Complete (0x0e) plen 4 #213 [hci0] 667.154584
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 18 #214 [hci0] 667.182619
LE Direct Advertising Report (0x0b)
Num reports: 1
Event type: Connectable directed - ADV_DIRECT_IND (0x01)
Address type: Random (0x01)
Address: 50:52:D9:A6:48:A0 (Resolvable)
Identity type: Public (0x00)
Identity: 11:22:33:44:55:66 (OUI 11-22-33)
Direct address type: Random (0x01)
Direct address: 7C:C1:57:A5:B7:A8 (Resolvable)
Identity type: Random (0x01)
Identity: F4:28:73:5D:38:B0 (Static)
RSSI: -70 dBm (0xba)
< HCI Command: LE Set Scan Enable (0x08|0x000c) plen 2 #215 [hci0] 667.182704
Scanning: Disabled (0x00)
Filter duplicates: Disabled (0x00)
> HCI Event: Command Complete (0x0e) plen 4 #216 [hci0] 667.183599
LE Set Scan Enable (0x08|0x000c) ncmd 1
Status: Success (0x00)
< HCI Command: LE Set Random Address (0x08|0x0005) plen 6 #217 [hci0] 667.183645
Address: 7C:C1:57:A5:B7:A8 (Resolvable)
Identity type: Random (0x01)
Identity: F4:28:73:5D:38:B0 (Static)
> HCI Event: Command Complete (0x0e) plen 4 #218 [hci0] 667.184590
LE Set Random Address (0x08|0x0005) ncmd 1
Status: Success (0x00)
< HCI Command: LE Create Connection (0x08|0x000d) plen 25 #219 [hci0] 667.184613
Scan interval: 60.000 msec (0x0060)
Scan window: 60.000 msec (0x0060)
Filter policy: White list is not used (0x00)
Peer address type: Random (0x01)
Peer address: 50:52:D9:A6:48:A0 (Resolvable)
Identity type: Public (0x00)
Identity: 11:22:33:44:55:66 (OUI 11-22-33)
Own address type: Random (0x01)
Min connection interval: 30.00 msec (0x0018)
Max connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Min connection length: 0.000 msec (0x0000)
Max connection length: 0.000 msec (0x0000)
> HCI Event: Command Status (0x0f) plen 4 #220 [hci0] 667.186558
LE Create Connection (0x08|0x000d) ncmd 1
Status: Success (0x00)
> HCI Event: LE Meta Event (0x3e) plen 19 #221 [hci0] 667.485824
LE Connection Complete (0x01)
Status: Success (0x00)
Handle: 0
Role: Master (0x00)
Peer address type: Random (0x01)
Peer address: 50:52:D9:A6:48:A0 (Resolvable)
Identity type: Public (0x00)
Identity: 11:22:33:44:55:66 (OUI 11-22-33)
Connection interval: 50.00 msec (0x0028)
Connection latency: 0 (0x0000)
Supervision timeout: 420 msec (0x002a)
Master clock accuracy: 0x07
@ MGMT Event: Device Connected (0x000b) plen 13 {0x0002} [hci0] 667.485996
LE Address: 11:22:33:44:55:66 (OUI 11-22-33)
Flags: 0x00000000
Data length: 0
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
2018-04-20 08:21:07 +02:00 |
| .. |
|
bnep
|
Bluetooth: bnep: fix possible might sleep error in bnep_session
|
2017-08-30 10:21:52 +02:00 |
|
cmtp
|
Bluetooth: cmtp: fix possible might sleep error in cmtp_session
|
2017-08-30 10:21:52 +02:00 |
|
hidp
|
Bluetooth: hidp: fix possible might sleep error in hidp_session_thread
|
2017-08-30 10:21:52 +02:00 |
|
rfcomm
|
Bluetooth: Fix using the correct source address type
|
2016-11-22 22:50:46 +01:00 |
|
6lowpan.c
|
Bluetooth: 6lowpan: fix delay work init in add_peer_chan()
|
2018-03-22 09:17:52 +01:00 |
|
a2mp.c
|
Bluetooth: Move get info completed callback to a2mp.c
|
2015-07-30 13:37:22 +02:00 |
|
a2mp.h
|
Bluetooth: Add BT_HS config option
|
2015-07-30 13:31:59 +02:00 |
|
af_bluetooth.c
|
Bluetooth: Avoid bt_accept_unlink() double unlinking
|
2018-03-22 09:17:52 +01:00 |
|
amp.c
|
Bluetooth: Fix breakage in amp_write_rem_assoc_frag()
|
2015-08-10 20:41:34 +02:00 |
|
amp.h
|
Bluetooth: Add BT_HS config option
|
2015-07-30 13:31:59 +02:00 |
|
ecc.c
|
Bluetooth: Add ECC library for LE Secure Connections
|
2014-12-03 16:51:16 +01:00 |
|
ecc.h
|
Bluetooth: Add ECC library for LE Secure Connections
|
2014-12-03 16:51:16 +01:00 |
|
hci_conn.c
|
Bluetooth: Fix connection if directed advertising and privacy is used
|
2018-04-20 08:21:07 +02:00 |
|
hci_core.c
|
Bluetooth: Send HCI Set Event Mask Page 2 command only when needed
|
2018-04-13 19:48:28 +02:00 |
|
hci_debugfs.c
|
Bluetooth: Add debugfs fields for hardware and firmware info
|
2016-07-18 09:33:28 +03:00 |
|
hci_debugfs.h
|
Bluetooth: Provide option to enable/disable debugfs information
|
2015-02-15 18:54:13 +02:00 |
|
hci_event.c
|
Bluetooth: Fix connection if directed advertising and privacy is used
|
2018-04-20 08:21:07 +02:00 |
|
hci_request.c
|
Bluetooth: Fix append max 11 bytes of name to scan rsp data
|
2016-10-19 18:42:37 +02:00 |
|
hci_request.h
|
Bluetooth: Fix append max 11 bytes of name to scan rsp data
|
2016-10-19 18:42:37 +02:00 |
|
hci_sock.c
|
Bluetooth: Fix user channel for 32bit userspace on 64bit kernel
|
2017-05-20 14:28:41 +02:00 |
|
hci_sysfs.c
|
Bluetooth: Remove controller device attributes
|
2016-07-09 21:37:11 +03:00 |
|
Kconfig
|
Bluetooth: add LED trigger for indicating HCI is powered up
|
2016-02-23 20:29:35 +01:00 |
|
l2cap_core.c
|
Bluetooth: Fix connection if directed advertising and privacy is used
|
2018-04-20 08:21:07 +02:00 |
|
l2cap_sock.c
|
Bluetooth: split sk_filter in l2cap_sock_recv_cb
|
2016-08-24 16:55:04 +02:00 |
|
leds.c
|
Bluetooth: Add combined LED trigger for controller power
|
2016-09-19 20:19:34 +02:00 |
|
leds.h
|
Bluetooth: Add combined LED trigger for controller power
|
2016-09-19 20:19:34 +02:00 |
|
lib.c
|
Bluetooth: Add BT_WARN and bt_dev_warn logging macros
|
2015-09-24 16:25:44 +02:00 |
|
Makefile
|
Bluetooth: add LED trigger for indicating HCI is powered up
|
2016-02-23 20:29:35 +01:00 |
|
mgmt.c
|
Bluetooth: Fix append max 11 bytes of name to scan rsp data
|
2016-10-19 18:42:37 +02:00 |
|
mgmt_util.c
|
Bluetooth: Add support for sending MGMT commands and events to monitor
|
2016-09-19 20:19:34 +02:00 |
|
mgmt_util.h
|
Bluetooth: Add generic mgmt helper API
|
2015-03-17 18:03:08 +01:00 |
|
sco.c
|
Bluetooth: Fix using the correct source address type
|
2016-11-22 22:50:46 +01:00 |
|
selftest.c
|
Bluetooth: Export ECDH selftest result in debugfs
|
2015-04-02 08:47:38 +03:00 |
|
selftest.h
|
Bluetooth: Add support for self testing framework
|
2014-12-30 08:53:55 +02:00 |
|
smp.c
|
Bluetooth: Fix missing encryption refresh on Security Request
|
2018-04-08 12:12:50 +02:00 |
|
smp.h
|
Bluetooth: Fix crash in SMP when unpairing
|
2015-10-22 09:02:03 +02:00 |