bthost: Fix not initializing address types properly
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 13 Aug 2021 20:54:10 +0000 (13:54 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:36 +0000 (19:08 +0530)
commit614bb9d91fb74a0c0cedf370bad95e5cdfb4916b
treeac07745cf9a6157a4d643540a3169ed475794527
parentdd8c5065b1be76e268d036c1bb2e83ef84c77228
bthost: Fix not initializing address types properly

The address type given to the init_conn is the peer address type
(btdev) not the bthost address type, the old code assume it could use
since only BDADDR_BREDR or BDADDR_LE_PUBLIC was tested but with the
upcoming support for LL Privacy the peer address type would become
BDADDR_LE_RANDOM which cannot be used as address type of bthost as that
doesn't support random addresses and would likely cause SMP to fail when
pairing.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
emulator/bthost.c