Bluetooth: Fix authentication check for FIPS security level
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 30 May 2014 11:45:19 +0000 (14:45 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 31 May 2014 04:25:01 +0000 (21:25 -0700)
When checking whether we need to request authentication or not we should
include HCI_SECURITY_FIPS to the levels that always need authentication.
This patch fixes check for it in the hci_outgoing_auth_needed()
function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Cc: stable@vger.kernel.org
net/bluetooth/hci_event.c

index 492d8d5..6cf9596 100644 (file)
@@ -1453,6 +1453,7 @@ static int hci_outgoing_auth_needed(struct hci_dev *hdev,
         * is requested.
         */
        if (!hci_conn_ssp_enabled(conn) && !(conn->auth_type & 0x01) &&
+           conn->pending_sec_level != BT_SECURITY_FIPS &&
            conn->pending_sec_level != BT_SECURITY_HIGH &&
            conn->pending_sec_level != BT_SECURITY_MEDIUM)
                return 0;