Bluetooth: L2CAP: Fix result of L2CAP_ECRED_CONN_RSP when MTU is too short
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/1 Bluetooth: L2CAP: Fix result of L2CAP_ECRED_CONN_RSP when MTU is too short
From: Luiz Augusto von Dentz <[email protected]>
Test L2CAP/ECFC/BV-26-C expect the response to L2CAP_ECRED_CONN_REQ with and MTU value < L2CAP_ECRED_MIN_MTU (64) to be L2CAP_CR_LE_INVALID_PARAMS rather than L2CAP_CR_LE_UNACCEPT_PARAMS.
--- include/net/bluetooth/l2cap.h | 6 +++--- net/bluetooth/l2cap_core.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
include/net/bluetooth/l2cap.h +3 -3
@@ -284,9 +284,9 @@ struct l2cap_conn_rsp {#define L2CAP_CR_LE_BAD_KEY_SIZE 0x0007#define L2CAP_CR_LE_ENCRYPTION 0x0008#define L2CAP_CR_LE_INVALID_SCID 0x0009 -#define L2CAP_CR_LE_SCID_IN_USE 0X000A -#define L2CAP_CR_LE_UNACCEPT_PARAMS 0X000B -#define L2CAP_CR_LE_INVALID_PARAMS 0X000C +#define L2CAP_CR_LE_SCID_IN_USE 0x000A +#define L2CAP_CR_LE_UNACCEPT_PARAMS 0x000B +#define L2CAP_CR_LE_INVALID_PARAMS 0x000C/* connect/create channel status */ #define L2CAP_CS_NO_INFO 0x0000
net/bluetooth/l2cap_core.c +1 -1
@@ -5075,7 +5075,7 @@ static inline int l2cap_ecred_conn_req(struct l2cap_conn *conn, mps =__le16_to_cpu (req->mps);if (mtu <L2CAP_ECRED_MIN_MTU || mps <L2CAP_ECRED_MIN_MPS ) { - result =L2CAP_CR_LE_UNACCEPT_PARAMS ; + result =L2CAP_CR_LE_INVALID_PARAMS ; goto response; }
Signature · 1 line
2.52.0
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1051297
---Test result---
Test Summary:
CheckPatch PENDING 0.64 seconds GitLint PENDING 0.33 seconds SubjectPrefix PASS 0.06 seconds BuildKernel PASS 25.96 seconds CheckAllWarning PASS 28.41 seconds CheckSparse WARNING 31.47 seconds BuildKernel32 PASS 25.15 seconds TestRunnerSetup PASS 561.58 seconds TestRunner_l2cap-tester PASS 28.36 seconds TestRunner_iso-tester PASS 77.80 seconds TestRunner_bnep-tester PASS 6.30 seconds TestRunner_mgmt-tester FAIL 119.31 seconds TestRunner_rfcomm-tester PASS 9.48 seconds TestRunner_sco-tester FAIL 14.51 seconds TestRunner_ioctl-tester PASS 10.13 seconds TestRunner_mesh-tester FAIL 11.78 seconds TestRunner_smp-tester PASS 8.60 seconds TestRunner_userchan-tester PASS 6.79 seconds IncrementalBuild PENDING 0.60 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: CheckSparse - WARNING
Desc: Run sparse tool with linux kernel
Output:net/bluetooth/l2cap_core.c:7735:1: error: bad constant expressionnet/bluetooth/l2cap_core.c:7736:1: error: bad constant expressionnet/bluetooth/l2cap_core.c:7738:1: error: bad constant expressionnet/bluetooth/l2cap_core.c:7739:1: error: bad constant expression
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.104 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:
WARNING: possible circular locking dependency detected
BUG: sleeping function called from invalid context at net/core/sock.c:3782
Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0
Failed Test Cases
Mesh - Send cancel - 1 Timed out 2.080 seconds Mesh - Send cancel - 2 Timed out 1.996 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:
---
Regards,
Linux Bluetooth