2023-08-06 08:19:58

by Simon Mikuda

[permalink] [raw]
Subject: [PATCH BlueZ 1/2] error: Add "Invalid exchange" mapping

This error is returned on this event:
> HCI Event: Auth Complete (0x06) plen 3
Status: PIN or Key Missing (0x06)
Handle: 11 Address: 00:00:00:00:00:00 (OUI 00-00-00)
---
src/error.c | 4 ++++
src/error.h | 2 ++
2 files changed, 6 insertions(+)

diff --git a/src/error.c b/src/error.c
index 29c071067..f179e6cda 100644
--- a/src/error.c
+++ b/src/error.c
@@ -171,6 +171,8 @@ const char *btd_error_bredr_conn_from_errno(int errno_code)
return ERR_BREDR_CONN_ABORT_BY_LOCAL;
case EPROTO:
return ERR_BREDR_CONN_LMP_PROTO_ERROR;
+ case EBADE:
+ return ERR_BREDR_CONN_KEY_MISSING;
default:
return ERR_BREDR_CONN_UNKNOWN;
}
@@ -209,6 +211,8 @@ const char *btd_error_le_conn_from_errno(int errno_code)
return ERR_LE_CONN_ABORT_BY_LOCAL;
case EPROTO:
return ERR_LE_CONN_LL_PROTO_ERROR;
+ case EBADE:
+ return ERR_LE_CONN_KEY_MISSING;
default:
return ERR_LE_CONN_UNKNOWN;
}
diff --git a/src/error.h b/src/error.h
index cc7790a23..83206cb48 100644
--- a/src/error.h
+++ b/src/error.h
@@ -43,6 +43,7 @@
#define ERR_BREDR_CONN_LMP_PROTO_ERROR "br-connection-lmp-protocol-"\
"error"
#define ERR_BREDR_CONN_CANCELED "br-connection-canceled"
+#define ERR_BREDR_CONN_KEY_MISSING "br-connection-key-missing"
#define ERR_BREDR_CONN_UNKNOWN "br-connection-unknown"

/* LE connection failure reasons */
@@ -63,6 +64,7 @@
#define ERR_LE_CONN_LL_PROTO_ERROR "le-connection-link-layer-protocol-"\
"error"
#define ERR_LE_CONN_GATT_BROWSE "le-connection-gatt-browsing"
+#define ERR_LE_CONN_KEY_MISSING "le-connection-key-missing"
#define ERR_LE_CONN_UNKNOWN "le-connection-unknown"

DBusMessage *btd_error_invalid_args(DBusMessage *msg);
--
2.34.1



2023-08-06 10:07:35

by bluez.test.bot

[permalink] [raw]
Subject: RE: Report proper error on connect

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=773409

---Test result---

Test Summary:
CheckPatch PASS 0.92 seconds
GitLint PASS 0.63 seconds
BuildEll PASS 32.96 seconds
BluezMake PASS 1188.84 seconds
MakeCheck PASS 13.56 seconds
MakeDistcheck PASS 193.65 seconds
CheckValgrind PASS 317.85 seconds
CheckSmatch PASS 443.22 seconds
bluezmakeextell PASS 132.21 seconds
IncrementalBuild PASS 2073.05 seconds
ScanBuild WARNING 1396.94 seconds

Details
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
profiles/audio/a2dp.c:352:8: warning: Use of memory after it is freed
if (!cb->resume_cb)
^~~~~~~~~~~~~
1 warning generated.



---
Regards,
Linux Bluetooth