linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Update sec_level and auth_type for already existing connections
@ 2010-06-15 12:56 Emeltchenko Andrei
  2010-06-20  4:14 ` Gustavo F. Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Emeltchenko Andrei @ 2010-06-15 12:56 UTC (permalink / raw)
  To: linux-bluetooth

From: Ville Tervo <ville.tervo@nokia.com>

Update auth level for already existing connections if it is lower
than required by new connection.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Reviewed-by: Emeltchenko Andrei <andrei.emeltchenko@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
---
 net/bluetooth/hci_conn.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index b10e3cd..800b6b9 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -358,6 +358,11 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
 		acl->sec_level = sec_level;
 		acl->auth_type = auth_type;
 		hci_acl_connect(acl);
+	} else {
+		if (acl->sec_level < sec_level)
+			acl->sec_level = sec_level;
+		if (acl->auth_type < auth_type)
+			acl->auth_type = auth_type;
 	}
 
 	if (type == ACL_LINK)
-- 
1.7.0.4


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

* Re: [PATCH] Bluetooth: Update sec_level and auth_type for already existing connections
  2010-06-15 12:56 [PATCH] Bluetooth: Update sec_level and auth_type for already existing connections Emeltchenko Andrei
@ 2010-06-20  4:14 ` Gustavo F. Padovan
  2010-06-21 11:41   ` Andrei Emeltchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-06-20  4:14 UTC (permalink / raw)
  To: Emeltchenko Andrei; +Cc: linux-bluetooth

Hi Andrei,

* Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com> [2010-06-15 15:56:05 +0300]:

> From: Ville Tervo <ville.tervo@nokia.com>
> 
> Update auth level for already existing connections if it is lower
> than required by new connection.
> 
> Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
> Reviewed-by: Emeltchenko Andrei <andrei.emeltchenko@nokia.com>
> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
> ---
>  net/bluetooth/hci_conn.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)

What's the use case here? i.e., how do I test your patch?

-- 
Gustavo F. Padovan
http://padovan.org

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

* Re: [PATCH] Bluetooth: Update sec_level and auth_type for already existing connections
  2010-06-20  4:14 ` Gustavo F. Padovan
@ 2010-06-21 11:41   ` Andrei Emeltchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Andrei Emeltchenko @ 2010-06-21 11:41 UTC (permalink / raw)
  To: Gustavo F. Padovan; +Cc: linux-bluetooth

Hi Gustavo,

On Sun, Jun 20, 2010 at 7:14 AM, Gustavo F. Padovan <gustavo@padovan.org> wrote:
> Hi Andrei,
>
> * Emeltchenko Andrei <Andrei.Emeltchenko.news@gmail.com> [2010-06-15 15:56:05 +0300]:
>
>> From: Ville Tervo <ville.tervo@nokia.com>
>>
>> Update auth level for already existing connections if it is lower
>> than required by new connection.
>>
>> Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
>> Reviewed-by: Emeltchenko Andrei <andrei.emeltchenko@nokia.com>
>> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
>> Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
>> ---
>>  net/bluetooth/hci_conn.c |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>
> What's the use case here? i.e., how do I test your patch?

- Create a device using org.bluez.Adapter.CreateDevice() and
-  immediately call org.bluez.adapter.CreatePairedDevice() to pair.

EXPECTED OUTCOME:
Devices are paired, and confirmation is asked on both.

ACTUAL OUTCOME:
Devices are paired without confirmation. If I wait 10 seconds after
CreateDevice, the confirmation is asked on both devices.

-- Regards,
Andrei

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

end of thread, other threads:[~2010-06-21 11:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-15 12:56 [PATCH] Bluetooth: Update sec_level and auth_type for already existing connections Emeltchenko Andrei
2010-06-20  4:14 ` Gustavo F. Padovan
2010-06-21 11:41   ` Andrei Emeltchenko

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).