2011-05-09 17:56:28

by Vinicius Costa Gomes

[permalink] [raw]
Subject: [PATCH] Fix starting the security procedure when setting the MTU

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



2011-05-09 23:48:41

by Vinicius Costa Gomes

[permalink] [raw]
Subject: Re: [PATCH] Fix starting the security procedure when setting the MTU

Hi Johan,

On 14:56 Mon 09 May, Vinicius Costa Gomes wrote:
> 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(-)
>

Please ignore this patch. As discussed on IRC, I will send a patch
that fixes the actual problem.


Cheers,
--
Vinicius