Diff between e61df1600a09334beab122a9580161ae1fabdca5 and ed31ac59ecb6e4e15c350e44637c05d7ef58c019

Changed Files

File Additions Deletions Status
plugins/hciops.c +4 -1 modified

Full Patch

diff --git a/plugins/hciops.c b/plugins/hciops.c
index a62b160..ef444da 100644
--- a/plugins/hciops.c
+++ b/plugins/hciops.c
@@ -3738,7 +3738,10 @@ static int hciops_create_bonding(int index, bdaddr_t *bdaddr,
 	if (conn->io != NULL)
 		return -EBUSY;
 
-	conn->loc_cap = io_cap;
+	/* hciops is not to be used for SMP pairing for LE devices. So
+	 * change the IO capability from KeyboardDisplay to DisplayYesNo
+	 * in case it is set. */
+	conn->loc_cap = (io_cap == 0x04 ? 0x01 : io_cap);
 
 	/* If our IO capability is NoInputNoOutput use medium security
 	 * level (i.e. don't require MITM protection) else use high