From f8fffe8423933433c30dda4f9a92afc71e8def21 Mon Sep 17 00:00:00 2001 From: Bhasker Neti Date: Thu, 25 Oct 2012 17:42:12 +0530 Subject: [PATCH] Bluetooth:Show bonding dialog if neither side requires no bonding If the bonded remote device is removed from the list of paired devices in the DUT, it is still possible to connect to the DUT from the remote device without any user confirmation. CRs-fixed: 413132 Change-Id: Iea3e4cf41e5403c3e304ca5f82cf42266be35b79 Signed-off-by: Bhasker Neti --- net/bluetooth/mgmt.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index d7deaafb15a..5f60288b28c 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -3011,6 +3011,12 @@ int mgmt_user_confirm_request(u16 index, u8 event, goto no_auto_confirm; } + /* Show bonding dialog if neither side requires no bonding */ + if ((conn->auth_type > 0x01) && (conn->remote_auth > 0x01)) { + if (!loc_mitm && !rem_mitm) + value = 0; + goto no_auto_confirm; + } if ((!loc_mitm || rem_cap == 0x03) && (!rem_mitm || loc_cap == 0x03)) ev.auto_confirm = 1;