[PATCH] Fix starting the security procedure when setting the MTU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The default security level of btio is BT_IO_SEC_MEDIUM, and for
LE links this would cause encryption to be started. So, we set the
security level to LOW (a no-op) and the MTU to the desired value.
---
 attrib/gattrib.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 8c15e52..55ec645 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -540,6 +540,7 @@ gboolean g_attrib_set_mtu(GAttrib *attrib, int mtu)
 
 	if (!bt_io_set(attrib->io, BT_IO_L2CAP, NULL,
 			BT_IO_OPT_OMTU, mtu,
+			BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_LOW,
 			BT_IO_OPT_INVALID))
 		return FALSE;
 
-- 
1.7.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux