2009-02-20 13:23:46

by Johan Hedberg

[permalink] [raw]
Subject: [PATCH] Allow BT_SECURITY for L2CAP raw sockets

Hi Marcel,

Here's the patch to permit BT_SECURITY for L2CAP raw sockets. It allows
our BtIO code to be simpler since there's no need to do special L2CAP_LM
tricks when doing paring using L2CAP raw sockets. It seemed to work fine
in my tests (both SSP and legacy pairing) so if it's ok with you I'll
also push the corresponding patch for bluetoothd (which without this
patch would cause EINVAL when trying pairing on a newer kernel).

Johan


Attachments:
(No filename) (441.00 B)
0001-Bluetooth-Permit-BT_SECURITY-also-for-L2CAP-raw-soc.patch (1.04 kB)
Download all attachments

2009-02-20 19:57:38

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] Allow BT_SECURITY for L2CAP raw sockets

Hi Johan,

> Here's the patch to permit BT_SECURITY for L2CAP raw sockets. It allows
> our BtIO code to be simpler since there's no need to do special L2CAP_LM
> tricks when doing paring using L2CAP raw sockets. It seemed to work fine
> in my tests (both SSP and legacy pairing) so if it's ok with you I'll
> also push the corresponding patch for bluetoothd (which without this
> patch would cause EINVAL when trying pairing on a newer kernel).

I pushed a little bit different version of the patch that only
explicitly allows SOCK_SEQPACKET and SOCK_RAW. In addition I did the
same for the getsockopt() case :)

Regards

Marcel