@@ -1737,6 +1737,17 @@ ble_ll_conn_master_init(struct ble_ll_conn_sm *connsm,
1737
1737
if (hcc -> filter_policy == 0 ) {
1738
1738
memcpy (& connsm -> peer_addr , & hcc -> peer_addr , BLE_DEV_ADDR_LEN );
1739
1739
connsm -> peer_addr_type = hcc -> peer_addr_type ;
1740
+
1741
+ /* If device was added to resolve list peer type has different meaning
1742
+ * and we need to adjust here. If device is on resolve list mark type as
1743
+ * 'identity' as this means also RPA is allowed for connection.
1744
+ */
1745
+ if ((connsm -> peer_addr_type < BLE_HCI_CONN_PEER_ADDR_PUBLIC_IDENT ) &&
1746
+ ble_ll_resolv_list_find (connsm -> peer_addr ,
1747
+ connsm -> peer_addr_type )) {
1748
+ connsm -> peer_addr_type += 2 ;
1749
+ }
1750
+
1740
1751
}
1741
1752
1742
1753
/* XXX: for now, just make connection interval equal to max */
@@ -1840,6 +1851,17 @@ ble_ll_conn_ext_master_init(struct ble_ll_conn_sm *connsm,
1840
1851
if (hcc -> filter_policy == 0 ) {
1841
1852
memcpy (& connsm -> peer_addr , & hcc -> peer_addr , BLE_DEV_ADDR_LEN );
1842
1853
connsm -> peer_addr_type = hcc -> peer_addr_type ;
1854
+
1855
+ /* In LE Extended Create Connection peer type has different meaning
1856
+ * than legacy LE Create Connection and since legacy values are used
1857
+ * internally we need to adjust here. If device is on resolve list
1858
+ * mark type as 'identity' as this means also RPA is allowed for
1859
+ * connection.
1860
+ */
1861
+ if (ble_ll_resolv_list_find (connsm -> peer_addr ,
1862
+ connsm -> peer_addr_type )) {
1863
+ connsm -> peer_addr_type += 2 ;
1864
+ }
1843
1865
}
1844
1866
1845
1867
connsm -> initial_params = * hcc ;
0 commit comments