summaryrefslogtreecommitdiffstats
path: root/src/dbus-hci.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2009-01-16 13:20:07 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2009-01-16 13:20:07 +0200
commitf6646fcfe84b703d0657a0e827682702d64a4788 (patch)
treed9e2502a9351f277346dce9560f2eee79d296b8b /src/dbus-hci.c
parentb5fe14e46c4351fe582f009de2f0b6d6834566e5 (diff)
Require MITM for dedicated bonding if the remote side is capable of it
Diffstat (limited to 'src/dbus-hci.c')
-rw-r--r--src/dbus-hci.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dbus-hci.c b/src/dbus-hci.c
index 994e25cc..e340d4e9 100644
--- a/src/dbus-hci.c
+++ b/src/dbus-hci.c
@@ -1277,8 +1277,14 @@ int hcid_dbus_get_io_cap(bdaddr_t *local, bdaddr_t *remote,
if (*auth == 0x00) {
/* If remote requests dedicated bonding follow that lead */
if (device_get_auth(device) == 0x02 ||
- device_get_auth(device) == 0x03)
- *auth = 0x02;
+ device_get_auth(device) == 0x03) {
+ /* If the remote has NoInputNoOutput then don't require
+ * MITM, otherwise require it */
+ if (device_get_cap(device) == 0x03)
+ *auth = 0x02;
+ else
+ *auth = 0x03;
+ }
/* If remote requires MITM then also require it */
if (device_get_auth(device) & 0x01)