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:
Claudio Takahasi 2013-10-16 16:05:07 -03:00 committed by Johan Hedberg
parent c03c91b624
commit 969a171deb

View File

@ -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)",