[Problem] There is no way to know if remote device is not bonded or it
doesn't support IDA (i.e. BR/EDR device, LE Static random address or
non-RPA used device).
[Cause & Measure] We consider only LE RPA device. So return not
supported error code for others.
[Checking Method] N/A
Change-Id: I734a468a64cc85fa6aac08a9f0621dd95c44217c
if (!device->le)
return btd_error_not_supported(msg);
+ if (device->bdaddr_type != BDADDR_LE_RANDOM)
+ return btd_error_not_supported(msg);
+
if (device->rpa) {
if (device->bredr)
ba2str(device->rpa, device_idaddr);
else
ba2str(&device->bdaddr, device_idaddr);
- } else
+ } else if ((device->bdaddr.b[5] >> 6) == 0x01)
return btd_error_does_not_exist(msg);
+ else
+ return btd_error_not_supported(msg);
reply = dbus_message_new_method_return(msg);
if (!reply)