This is an automated email from the ASF dual-hosted git repository.
sjanc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
The following commit(s) were added to refs/heads/master by this push:
new 36961afc8 nimble/host: Fix L2CAP response matching for invalid ID 0x00
36961afc8 is described below
commit 36961afc866dbbf5abdad2c45c3690a503a7fc7e
Author: Piotr Narajowski <[email protected]>
AuthorDate: Thu Oct 8 15:57:07 2026 +0200
nimble/host: Fix L2CAP response matching for invalid ID 0x00
As per Core Spec 6.3, Vol 3, Part A, Sec 4 an identifier equal to
0x00 is invalid. Previously, ble_l2cap_sig_proc_matches treated id
0 as awildcard, causing incoming L2CAP responses with ID 0x00 to
incorrectly match and extract active procedures. This was
affecting L2CAP/COS/CED/BI-29-C qualification test case.
Remove wildcard matching on ID 0 and update function docstring
accordingly to enforce strict identifier equalitiy.
---
nimble/host/src/ble_l2cap_sig.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/nimble/host/src/ble_l2cap_sig.c b/nimble/host/src/ble_l2cap_sig.c
index 2325909be..a38a7c51f 100644
--- a/nimble/host/src/ble_l2cap_sig.c
+++ b/nimble/host/src/ble_l2cap_sig.c
@@ -255,7 +255,6 @@ ble_l2cap_sig_proc_free(struct ble_l2cap_sig_proc *proc)
* @param conn_handle The connection handle to match against.
* @param op The op code to match against/
* @param id The identifier to match against.
- * 0=Ignore this criterion.
*
* @return 1 if the proc matches; 0 otherwise.
*/
@@ -271,7 +270,7 @@ ble_l2cap_sig_proc_matches(struct ble_l2cap_sig_proc *proc,
return 0;
}
- if (id != 0 && id != proc->id) {
+ if (id != proc->id) {
return 0;
}
@@ -286,7 +285,6 @@ ble_l2cap_sig_proc_matches(struct ble_l2cap_sig_proc *proc,
* @param conn_handle The connection handle to match against.
* @param op The op code to match against.
* @param identifier The identifier to match against;
- * 0=ignore this criterion.
*
* @return The matching proc entry on success;
* null on failure.