summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-17 15:35:38 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-07-17 14:39:39 +0200
commite7cafc45258c852c5176cd421615846e79a3d307 (patch)
tree8fbc0fa09ea36fc175d57b46a98ae28450628973 /net/bluetooth/mgmt.c
parentc1d4fa7aa86e9194724dfff9cb9359edb98d75ac (diff)
downloadlinux-stable-e7cafc45258c852c5176cd421615846e79a3d307.tar.gz
linux-stable-e7cafc45258c852c5176cd421615846e79a3d307.tar.bz2
linux-stable-e7cafc45258c852c5176cd421615846e79a3d307.zip
Bluetooth: Pass initiator/acceptor information to hci_conn_security()
We're interested in whether an authentication request is because of a remote or local action. So far hci_conn_security() has been used both for incoming and outgoing actions (e.g. RFCOMM or L2CAP connect requests) so without some modifications it cannot know which peer is responsible for requesting authentication. This patch adds a new "bool initiator" parameter to hci_conn_security() to indicate which side is responsible for the request and updates the current users to pass this information correspondingly. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index b981bfb87f86..190668367e42 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3202,7 +3202,7 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
cmd->user_data = conn;
if (conn->state == BT_CONNECTED &&
- hci_conn_security(conn, sec_level, auth_type))
+ hci_conn_security(conn, sec_level, auth_type, true))
pairing_complete(cmd, 0);
err = 0;