All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Krasnyansky <maxk@qualcomm.com>
To: Stephen Crane <steve.crane@rococosoft.com>,
	bluez-devel@lists.sourceforge.net
Cc: marcel@rvs.uni-bielefeld.de
Subject: Re: [Bluez-devel] RFComm channel allocation
Date: Wed, 08 Oct 2003 17:52:57 -0700	[thread overview]
Message-ID: <5.1.0.14.2.20031008174223.058f41d8@unixmail.qualcomm.com> (raw)
In-Reply-To: <1062078007.1823.33.camel@baroque.rococosoft.com>

At 06:40 AM 8/28/2003, Stephen Crane wrote:
>Hi,
>It seems that bind() on a sockaddr_rc doesn't check its channel
>argument: it allows binding to a channel number which then cannot be
>connect()ed to. (connect() seems to check this argument fine.)
>
>For example, I can bind a listening socket to channel 0 or 40:
>$ cat /proc/bluetooth/rfcomm
>sk  00:00:00:00:00:00 00:00:00:00:00:00 2 0
>sk  00:00:00:00:00:00 00:00:00:00:00:00 4 40
>
>$ cat /proc/bluetooth/rfcomm
>sk  00:00:00:00:00:00 00:00:00:00:00:00 2 0
>sk  00:00:00:00:00:00 00:00:00:00:00:00 4 0
Definitely a bug. The thing is that when we do bind() we don't call RFCOMM 
DLC layer (ie rfcomm_dlc_xxx stuff). connect() is calling rfcomm_dlc_open() 
which where channel validity check it performed.
I guess we'll have to add the same check in bind().

>On a related matter (and I'm pretty sure this /has/ come up before),
>would it be possible to perform automatic channel allocation in the
>kernel? 0 would be a good distinguishing value for this (since it is
>reserved to the RFComm multiplexer).
It's possible but does not seem to be needed. I mean so far nobody had
a strong argument why we need to support it.

Max



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

       reply	other threads:[~2003-10-09  0:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1062078007.1823.33.camel@baroque.rococosoft.com>
2003-10-09  0:52 ` Max Krasnyansky [this message]
2003-10-09 10:51   ` [Bluez-devel] RFComm channel allocation Stephen Crane
2003-10-09 17:58     ` Max Krasnyansky

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=5.1.0.14.2.20031008174223.058f41d8@unixmail.qualcomm.com \
    --to=maxk@qualcomm.com \
    --cc=bluez-devel@lists.sourceforge.net \
    --cc=marcel@rvs.uni-bielefeld.de \
    --cc=steve.crane@rococosoft.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.