From: Seung-Woo Kim <sw0312.kim@samsung.com>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: "linux-bluetooth@vger.kernel.org development"
<linux-bluetooth@vger.kernel.org>,
"Gustavo F. Padovan" <gustavo@padovan.org>,
Johan Hedberg <johan.hedberg@gmail.com>,
Syam Sidhardhan <s.syam@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>
Subject: Re: [PATCH] Bluetooth: Fix RFCOMM bind fail for L2CAP sock
Date: Tue, 05 Nov 2013 16:38:14 +0900 [thread overview]
Message-ID: <5278A066.5020409@samsung.com> (raw)
In-Reply-To: <CE0DCFC3-31E3-4693-9C7C-703CA43A0883@holtmann.org>
Hello Marcel Holtmann,
On 2013년 11월 05일 16:26, Marcel Holtmann wrote:
> Hi Seung-Woo,
>
>> L2CAP socket bind checks its bdaddr type but RFCOMM kernel thread
>> does not assign proper bdaddr type for L2CAP sock. This can cause
>> that RFCOMM failure.
>>
>> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
>> ---
>> The issue is came from following commit, but it is only in bluetooth-next tree,
>> so this patch is not needed for stable tree.
>>
>> commit 80c1a2e76dbb36588facb265ab364b1302f7ef8c
>> Author: Johan Hedberg <johan.hedberg@intel.com>
>> Date: Mon Oct 14 21:17:52 2013 +0300
>>
>> Bluetooth: Reject invalid bdaddr types for sockets
>>
>> This patch is based on commit cca34b785a21d220176038c45071ffe842e99fd3 of
>> bluetooth-next tree.
>> ---
>> net/bluetooth/rfcomm/core.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> good catch. Patch has been applied to bluetooth-next tree.
>
> You might also want to send a patch that adds the l2_bdaddr_type setting before the connect() call.
Case of kernel_connect() in rfcomm_session_create(), it reuses
l2_bdaddr_type used for kernel_bind(), so it works fine for me: I tested
both incoming connection and outgoing connection cases of rfcomm.
But if you prefer explicit setting for connect(), please let me know.
Best Regards,
- Seung-Woo Kim
>
> Regards
>
> Marcel
>
>
--
Seung-Woo Kim
Samsung Software R&D Center
--
next prev parent reply other threads:[~2013-11-05 7:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 7:02 [PATCH] Bluetooth: Fix RFCOMM bind fail for L2CAP sock Seung-Woo Kim
2013-11-05 7:26 ` Marcel Holtmann
2013-11-05 7:38 ` Seung-Woo Kim [this message]
2013-11-05 7:58 ` Marcel Holtmann
2013-11-05 8:15 ` [PATCH] Bluetooth: Fix to set proper bdaddr_type for RFCOMM connect Seung-Woo Kim
2013-11-05 12:07 ` Marcel Holtmann
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=5278A066.5020409@samsung.com \
--to=sw0312.kim@samsung.com \
--cc=gustavo@padovan.org \
--cc=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=s.syam@samsung.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