From f7f986a43458d5c961a63b0745ba69e971fe508d Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Fri, 2 Sep 2011 14:51:20 -0300 Subject: [PATCH] --- yaml --- r: 266332 b: refs/heads/master c: e9bf2bf03e14627fac8520468231ea11dfa37610 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/bluetooth/hci_event.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 2f9e87ca794f..b100f65dec35 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8aab47574a7f5b46a4cdbc6fd820ab34e6c5dbf9 +refs/heads/master: e9bf2bf03e14627fac8520468231ea11dfa37610 diff --git a/trunk/net/bluetooth/hci_event.c b/trunk/net/bluetooth/hci_event.c index e54d08222605..fd6eea0941b6 100644 --- a/trunk/net/bluetooth/hci_event.c +++ b/trunk/net/bluetooth/hci_event.c @@ -1103,9 +1103,10 @@ static int hci_outgoing_auth_needed(struct hci_dev *hdev, return 0; /* Only request authentication for SSP connections or non-SSP - * devices with sec_level HIGH */ + * devices with sec_level HIGH or if MITM protection is requested */ if (!(hdev->ssp_mode > 0 && conn->ssp_mode > 0) && - conn->pending_sec_level != BT_SECURITY_HIGH) + conn->pending_sec_level != BT_SECURITY_HIGH && + !(conn->auth_type & 0x01)) return 0; return 1;