Bluetooth: L2CAP: Fix CIDs in disconnect request
The destination and source CIDs were mixed up in the L2CAP Disconnect request. Fixes #36665 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
b676e6a628
commit
9aedfa676b
1 changed files with 2 additions and 2 deletions
|
|
@ -2607,8 +2607,8 @@ int bt_l2cap_chan_disconnect(struct bt_l2cap_chan *chan)
|
||||||
}
|
}
|
||||||
|
|
||||||
req = net_buf_add(buf, sizeof(*req));
|
req = net_buf_add(buf, sizeof(*req));
|
||||||
req->dcid = sys_cpu_to_le16(ch->rx.cid);
|
req->dcid = sys_cpu_to_le16(ch->tx.cid);
|
||||||
req->scid = sys_cpu_to_le16(ch->tx.cid);
|
req->scid = sys_cpu_to_le16(ch->rx.cid);
|
||||||
|
|
||||||
l2cap_chan_send_req(chan, buf, L2CAP_DISC_TIMEOUT);
|
l2cap_chan_send_req(chan, buf, L2CAP_DISC_TIMEOUT);
|
||||||
bt_l2cap_chan_set_state(chan, BT_L2CAP_DISCONNECT);
|
bt_l2cap_chan_set_state(chan, BT_L2CAP_DISCONNECT);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue