Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-05-27 07:33:41 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-05-27 07:33:41 +0200
commitac3a7b34fd72238aaf5d49beb475a6e522395a07 (patch)
tree7738ccf5fa66fb16f9fdda25092427b53edfafb3
parentbe9b888d80df2ecd125b3790c7780ca754a54f63 (diff)
parentb7d1bcad36631e481f71159a8a09ee375f0b524b (diff)
Merge branch 'SLE15-SP1' into openSUSE-15.1openSUSE-15.1
-rw-r--r--net/bluetooth/hci_conn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 5f9ab9181654..8ce92292ce78 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1148,8 +1148,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
return 0;
}
- if (hci_conn_ssp_enabled(conn) &&
- !test_bit(HCI_CONN_ENCRYPT, &conn->flags))
+ /* If Secure Simple Pairing is not enabled, then legacy connection
+ * setup is used and no encryption or key sizes can be enforced.
+ */
+ if (!hci_conn_ssp_enabled(conn))
+ return 1;
+
+ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
return 0;
/* The minimum encryption key size needs to be enforced by the