From: jaikumar Ganesh <jaikumarg@gmail.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Nick Pelly <npelly@google.com>,
Ville Tervo <ville.tervo@nokia.com>,
linux-bluetooth@vger.kernel.org, johan.hedberg@nokia.com
Subject: Re: [RFC] Some kernel changes
Date: Thu, 15 Jan 2009 15:52:28 -0800 [thread overview]
Message-ID: <ac290f760901151552y2b176f0cjf44a29dabfa8e309@mail.gmail.com> (raw)
In-Reply-To: <1232061946.15331.1.camel@californication>
Hi Marcel,
On Thu, Jan 15, 2009 at 3:25 PM, Marcel Holtmann <marcel@holtmann.org> wrote:
> Hi,
>
>> so I pushed another set of patches to the
>> bluetooth-testing.git tree and
>> it should include the full BT_SECURITY implemention,
>> BT_DEFER_SETUP for
>> RFCOMM and SCO rejection if no listen socket is present.
>>
>> It currently only drops the connection is encryption is
>> disabled when
>> using BT_SECURITY_HIGH. That is only used for SAP anyway. For
>> all other
>> profiles we use BT_SECURITY_MEDIUM.
>>
>> I updated our build with the patches and after picking up 6e26576c
>> (Pause RFCOMM TX when encryption drops) and fixes upto f32ef1836
>> (Enforce authentication before encryption) I see a couple of
>> problems::
>>
>> a) I see that in rfcomm/core.c in function rfcomm_security_cfm:
>> when the remote side has dropped the encryption for the role change,
>> we set the RFCOMM_SEC_PENDING bit but we don't set RFCOMM_AUTH_PENDING
>> as suggested in Ville's original patch and so when encryption is
>> re-established we dont get past the - test_and_clear_bit
>> (RFCOMM_AUTH_PENDING) check in the function.
>
> why do you wanna set AUTH_PENDING again. That is not needed we only
> wanna know once encryption comes back on. If no in time, then we just
> disconnect the link. That simple.
>
>> b) I also see that we are not clearing the timer and hence after
>> RFCOMM_AUTH_TIMEOUT period expires we bring down the RFCOMM connection
>> even though the encryption has been established.
>
> Good catch. Fixed it.
Cool. Can you upload it to bluetooth-testing git ? I saw a related
problem while looking at the timer issue and wanted to see if the fix
takes care of it.
The timer thats started in rfcomm_security_cfm (for the drop in
encryption) does get cleared in rfcomm_process_dlcs
but then we have some data to send. So we send the RFCOMM PN packet
just after encryption is re-established.
This results in a new timer being started in rfcomm_process_dlcs and
we don't get the UA packet to clear this timer and hence when
the timer expires, the connection is dropped.
Thanks
Jaikumar
> Regards
>
> Marcel
>
>
>
next prev parent reply other threads:[~2009-01-15 23:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-10 12:33 [RFC] Some kernel changes Ville Tervo
2009-01-10 14:18 ` Marcel Holtmann
2009-01-10 14:26 ` Johan Hedberg
2009-01-12 13:53 ` Marcel Holtmann
2009-01-12 17:15 ` Nick Pelly
2009-01-13 19:12 ` Marcel Holtmann
2009-01-15 19:13 ` jaikumar Ganesh
2009-01-15 23:25 ` Marcel Holtmann
2009-01-15 23:52 ` jaikumar Ganesh [this message]
2009-01-16 9:47 ` Marcel Holtmann
2009-01-20 18:54 ` jaikumar Ganesh
2009-01-20 20:02 ` Marcel Holtmann
2009-01-21 0:28 ` jaikumar Ganesh
2009-01-21 11:19 ` Marcel Holtmann
2009-01-21 17:46 ` jaikumar Ganesh
2009-01-28 9:27 ` jaikumar Ganesh
2009-01-28 9:59 ` Marcel Holtmann
2009-01-28 10:18 ` jaikumar Ganesh
2009-01-28 10:35 ` Marcel Holtmann
2009-01-15 19:14 ` jaikumar Ganesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac290f760901151552y2b176f0cjf44a29dabfa8e309@mail.gmail.com \
--to=jaikumarg@gmail.com \
--cc=johan.hedberg@nokia.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=npelly@google.com \
--cc=ville.tervo@nokia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox