linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix starting the security procedure when setting the MTU
@ 2011-05-09 17:56 Vinicius Costa Gomes
  2011-05-09 23:48 ` Vinicius Costa Gomes
  0 siblings, 1 reply; 2+ messages in thread
From: Vinicius Costa Gomes @ 2011-05-09 17:56 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Vinicius Costa Gomes

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix starting the security procedure when setting the MTU
  2011-05-09 17:56 [PATCH] Fix starting the security procedure when setting the MTU Vinicius Costa Gomes
@ 2011-05-09 23:48 ` Vinicius Costa Gomes
  0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Costa Gomes @ 2011-05-09 23:48 UTC (permalink / raw)
  To: linux-bluetooth

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-05-09 23:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 17:56 [PATCH] Fix starting the security procedure when setting the MTU Vinicius Costa Gomes
2011-05-09 23:48 ` Vinicius Costa Gomes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).