diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/smp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 6f29430c29c4..a0150033e797 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c | |||
@@ -909,6 +909,12 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) | |||
909 | 909 | ||
910 | authreq = seclevel_to_authreq(sec_level); | 910 | authreq = seclevel_to_authreq(sec_level); |
911 | 911 | ||
912 | /* hcon->auth_type is set by pair_device in mgmt.c. If the MITM | ||
913 | * flag is set we should also set it for the SMP request. | ||
914 | */ | ||
915 | if ((hcon->auth_type & 0x01)) | ||
916 | authreq |= SMP_AUTH_MITM; | ||
917 | |||
912 | if (hcon->link_mode & HCI_LM_MASTER) { | 918 | if (hcon->link_mode & HCI_LM_MASTER) { |
913 | struct smp_cmd_pairing cp; | 919 | struct smp_cmd_pairing cp; |
914 | 920 | ||