linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Syam Sidhardhan <s.syam@samsung.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 1/4] Bluetooth: Fix L2CAP PSM bind issue
Date: Thu, 11 Oct 2012 15:56:50 +0200	[thread overview]
Message-ID: <1349963810.27233.178.camel@aeonflux> (raw)
In-Reply-To: <E3660838E8D64186924BA81A32F30682@sisodomain.com>

Hi Syam,

> >> Problem: If we bind a particular PSM with source address as BDADDR_ANY,
> >> then we are able to bind the same PSM with adapter address(or any other
> >> address), which is incorrect.
> >
> > why is this incorrect? Explain that to me.
> >
> 
> Here there is a correction required in the commit message.
> 
> As per my understanding the a particular PSM can be binded only once
> for a single adapter address. Kindly correct me if I'm wrong here.

a PSM can be bound once per adapter address. And of course once per
BDADDR_ANY.

So you can bind PSM 23 to BDADDR_ANY and 11:22:33:44:55:66. An incoming
connection to 11:22:33:44:55:66 will arrive to that specific socket, but
an incoming to all others will be handled by the BDADDR_ANY.

The BDADDR_ANY is special. Consider it a wildcard bound with lower
priority. If overwritten with a specific address bound, that will be
considered first of course.

If we are not doing it that way, than that is a bug.

Outgoing connections should behave the same btw. If a specific address
is bound, than that will be used. If not available, then you can not
connect. If BDADDR_ANY is used, then the next available adapter will be
used.

Regards

Marcel



  reply	other threads:[~2012-10-11 13:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-10 16:39 [PATCH 1/4] Bluetooth: Fix L2CAP PSM bind issue Syam Sidhardhan
2012-10-10 16:39 ` [PATCH 2/4] Bluetooth: Fix RFCOMM " Syam Sidhardhan
2012-10-10 16:39 ` [PATCH 3/4] Bluetooth: Use __constant modifier for L2CAP SMP CID Syam Sidhardhan
2012-10-10 17:48   ` Marcel Holtmann
2012-10-10 16:39 ` [PATCH 4/4] Bluetooth: Use __constant modifier for RFCOMM PSM Syam Sidhardhan
2012-10-10 17:48   ` Marcel Holtmann
2012-10-11  6:27   ` Gustavo Padovan
2012-10-10 17:47 ` [PATCH 1/4] Bluetooth: Fix L2CAP PSM bind issue Marcel Holtmann
2012-10-11 11:19   ` Syam Sidhardhan
2012-10-11 13:56     ` Marcel Holtmann [this message]
2012-10-11 14:29       ` Luiz Augusto von Dentz
2012-10-15 18:16         ` Syam Sidhardhan

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=1349963810.27233.178.camel@aeonflux \
    --to=marcel@holtmann.org \
    --cc=linux-bluetooth@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).