summaryrefslogtreecommitdiff
path: root/monitor/l2cap.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2016-12-07 22:12:26 +0200
committerJohan Hedberg <johan.hedberg@intel.com>2016-12-07 22:12:55 +0200
commit673c58ff65a0d48c48683ff6515383ee75692962 (patch)
treeeb78a6fce28549c34a2175e57f9b799186148849 /monitor/l2cap.c
parent4832ed033973018a8f87f156fb8f33c8f80a5904 (diff)
downloadbluez-673c58ff65a0d48c48683ff6515383ee75692962.tar.gz
monitor: Add decoding of SMP CT2 authentication flag
Diffstat (limited to 'monitor/l2cap.c')
-rw-r--r--monitor/l2cap.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index f4b54af04..3c41ac44e 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -2671,7 +2671,7 @@ static void print_smp_oob_data(uint8_t oob_data)
static void print_smp_auth_req(uint8_t auth_req)
{
- const char *bond, *mitm, *sc, *kp;
+ const char *bond, *mitm, *sc, *kp, *ct2;
switch (auth_req & 0x03) {
case 0x00:
@@ -2700,8 +2700,13 @@ static void print_smp_auth_req(uint8_t auth_req)
else
kp = "No Keypresses";
- print_field("Authentication requirement: %s, %s, %s, %s (0x%2.2x)",
- bond, mitm, sc, kp, auth_req);
+ if ((auth_req & 0x20))
+ ct2 = ", CT2";
+ else
+ ct2 = "";
+
+ print_field("Authentication requirement: %s, %s, %s, %s%s (0x%2.2x)",
+ bond, mitm, sc, kp, ct2, auth_req);
}
static void print_smp_key_dist(const char *label, uint8_t dist)