OSDN Git Service

Bluetooth: Set general bonding security for ACL by default
authorAndrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
Thu, 3 Sep 2009 09:34:19 +0000 (12:34 +0300)
committerNick Pelly <npelly@google.com>
Wed, 7 Oct 2009 10:38:10 +0000 (03:38 -0700)
This patch fixes double pairing issues with SSP.

It was observed that when pairing with SSP bluez asks confirmation
2 times.
http://www.spinics.net/lists/linux-bluetooth/msg02473.html

This also causes bug when we initiate SSP connection from Vista.

The reason is because bluetoothd does not store link keys since
ioctl  HCIGETAUTHINFO returns 0. Setting default general
bonding fixes these issues.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
net/bluetooth/hci_conn.c

index 93517ea..055ac57 100644 (file)
@@ -213,6 +213,7 @@ struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
        conn->type  = type;
        conn->mode  = HCI_CM_ACTIVE;
        conn->state = BT_OPEN;
+       conn->auth_type = HCI_AT_GENERAL_BONDING;
 
        conn->power_save = 1;