host/l2cap_sig: MPS on any channel cannot be decreased
If reconfiguration request contains >1 CID and MPS value is reduced for
only one of them this request should still fail.
This is affecting L2CAP/ECFC/BI-04-C
@@ -796,10 +796,6 @@ ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle,
if (chan[i]->peer_coc_mps > req->mps) {
reduction_mps++;
- if (reduction_mps > 1) {
- rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_REDUCTION_MPS_NOT_ALLOWED);
- goto failed;
- }
}
if (chan[i]->coc_tx.mtu > req->mtu) {
@@ -808,6 +804,11 @@ ble_l2cap_sig_credit_base_reconfig_req_rx(uint16_t conn_handle,
}
}
+ if (reduction_mps > 0 && cid_cnt > 1) {
+ rsp->result = htole16(BLE_L2CAP_ERR_RECONFIG_REDUCTION_MPS_NOT_ALLOWED);
+ goto failed;
+ }
+
ble_hs_unlock();
for (i = 0; i < cid_cnt; i++) {
