summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDudu Lu <phx0fer@gmail.com>2026-04-15 13:43:55 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2026-05-06 23:20:38 +0300
commit4f42363c814f28fe3f59847c35acf1ed033bedd4 (patch)
tree026032f05fbae0e4b6af9dd9c70b9b008ad0ca5e /include
parent72b8deccff17a7644e0367e1aaf1a36cfb014324 (diff)
downloadlinux-4f42363c814f28fe3f59847c35acf1ed033bedd4.tar.xz
Bluetooth: l2cap: fix MPS check in l2cap_ecred_reconf_req
The L2CAP specification states that if more than one channel is being reconfigured, the MPS shall not be decreased. The current check has two issues: 1) The comparison uses >= (greater-than-or-equal), which incorrectly rejects reconfiguration requests where the MPS stays the same. Since the spec says MPS "shall be greater than or equal to the current MPS", only a strict decrease (remote_mps > mps) should be rejected. Keeping the same MPS is valid. 2) The multi-channel guard uses `&& i` (loop index) to approximate "more than one channel", but this incorrectly allows MPS decrease for the first channel (i==0) even when multiple channels are being reconfigured. Replace with `&& num_scid > 1` which correctly checks whether the request covers more than one channel. Fixes: 7accb1c4321a ("Bluetooth: L2CAP: Fix invalid response to L2CAP_ECRED_RECONF_REQ") Signed-off-by: Dudu Lu <phx0fer@gmail.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions