2004-07-08 14:52:19

by Collin R. Mulliner

[permalink] [raw]
Subject: [Bluez-devel] patch for: RFComm dynamic channel allocation

Hi,

just found and fixed the problem with dynamic rfcomm channel allocation.
My code binds to a specific local bdaddr, the rfcomm tool binds to ANY.
This case was not handled correctly. The fix is simple, see attachment.


... Collin

--
Collin R. Mulliner <[email protected]>
BETAVERSiON Systems [http://www.betaversion.net]
info/pgp: finger [email protected]
Just don't create a file called -rf. :-) --Larry Wall


Attachments:
rfcomm_dynamic_channel_alloc_fix.patch (382.00 B)

2004-07-08 18:36:49

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] patch for: RFComm dynamic channel allocation

Hi Collin,

> > I don't get the point of your fix, because bind() to a specific
> > BD_ADDR and to BDADDR_ANY are totally different and can result in
> > different dynamic channel allocations.
>
> I understand why binding to BDADDR_ANY could lead to a different
> channel, e.g. when having multiple BT devices but the current code
> doesn't work when binding to a specific BD_ADDR. I only talk about
> dynamic rfcomm channel allocation which takes place when calling
> listen()! Not about the general bind().

the code works, because the scope of a specific BD_ADDR is different
from BDADDR_ANY and both start with channel 1. I am not going to mix
them two in the kernel, because this is an application specific problem
you are trying to solve.

Regards

Marcel




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit http://www.blackhat.com
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2004-07-08 18:08:05

by Collin R. Mulliner

[permalink] [raw]
Subject: Re: [Bluez-devel] patch for: RFComm dynamic channel allocation

Hi Marcel,

> I don't get the point of your fix, because bind() to a specific
> BD_ADDR and to BDADDR_ANY are totally different and can result in
> different dynamic channel allocations.

I understand why binding to BDADDR_ANY could lead to a different
channel, e.g. when having multiple BT devices but the current code
doesn't work when binding to a specific BD_ADDR. I only talk about
dynamic rfcomm channel allocation which takes place when calling
listen()! Not about the general bind().

... Collin

--
Collin R. Mulliner <[email protected]>
BETAVERSiON Systems [http://www.betaversion.net]
info/pgp: finger [email protected]
Success is a journey, not a destination. So stop running.


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit http://www.blackhat.com
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2004-07-08 17:37:11

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] patch for: RFComm dynamic channel allocation

Hi Collin,

> just found and fixed the problem with dynamic rfcomm channel allocation.
> My code binds to a specific local bdaddr, the rfcomm tool binds to ANY.
> This case was not handled correctly. The fix is simple, see attachment.

I don't get the point of your fix, because bind() to a specific BD_ADDR
and to BDADDR_ANY are totally different and can result in different
dynamic channel allocations.

Regards

Marcel




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit http://www.blackhat.com
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel