Re: [PATCH] Bluetooth: Reintroduce socket restrictions for LE sockets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

On Wed, Oct 16, 2013, Marcel Holtmann wrote:
> > Right now we do not allow user space to use connection oriented channels
> > on LE, and the only CID that can be used is the Attribute Protocol one.
> > These restrictions went away together with the recent refactoring of the
> > L2CAP code, but this patch puts them back to their appropriate places.
> > 
> > Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> > ---
> > net/bluetooth/l2cap_sock.c | 20 ++++++++++++++++++++
> > 1 file changed, 20 insertions(+)
> > 
> > diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> > index 68f486a..bda52d7 100644
> > --- a/net/bluetooth/l2cap_sock.c
> > +++ b/net/bluetooth/l2cap_sock.c
> > @@ -72,6 +72,16 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int alen)
> > 	if (!bdaddr_type_is_valid(la.l2_bdaddr_type))
> > 		return -EINVAL;
> > 
> > +	if (la.l2_bdaddr_type == BDADDR_LE_PUBLIC ||
> > +	    la.l2_bdaddr_type == BDADDR_LE_RANDOM) {
> 
> can we use bdaddr_type_is_le() here instead.

I forgot that we had that helper. A v2 has been sent.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux