mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-26 13:44:23 +08:00
l2test: Set CID due to socket restrictions for LE
Bluetooth kernel now restricts LE L2CAP sockets to ATT channels only. For LE L2CAP socket bind, ATT CID is now mandatory. Reference: kernel patch bfe4655f05d7ec4a7c0c1c7e4051862f824cd8ec
This commit is contained in:
parent
c03c91b624
commit
969a171deb
@ -280,6 +280,8 @@ static int do_connect(char *svr)
|
||||
addr.l2_family = AF_BLUETOOTH;
|
||||
bacpy(&addr.l2_bdaddr, &bdaddr);
|
||||
addr.l2_bdaddr_type = bdaddr_type;
|
||||
if (cid)
|
||||
addr.l2_cid = htobs(cid);
|
||||
|
||||
if (bind(sk, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
|
||||
syslog(LOG_ERR, "Can't bind socket: %s (%d)",
|
||||
|
Loading…
Reference in New Issue
Block a user