diff options
-rw-r--r-- | include/net/bluetooth/hci_core.h | 3 | ||||
-rw-r--r-- | net/bluetooth/l2cap.c | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index f75028b33883..9473fce499e7 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -597,6 +597,9 @@ static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encr | |||
597 | { | 597 | { |
598 | struct list_head *p; | 598 | struct list_head *p; |
599 | 599 | ||
600 | if (conn->sec_level == BT_SECURITY_SDP) | ||
601 | conn->sec_level = BT_SECURITY_LOW; | ||
602 | |||
600 | hci_proto_encrypt_cfm(conn, status, encrypt); | 603 | hci_proto_encrypt_cfm(conn, status, encrypt); |
601 | 604 | ||
602 | read_lock_bh(&hci_cb_list_lock); | 605 | read_lock_bh(&hci_cb_list_lock); |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 01f750142d55..88340d24d11d 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -805,7 +805,7 @@ static int l2cap_sock_bind(struct socket *sock, struct sockaddr *addr, int addr_ | |||
805 | l2cap_pi(sk)->sport = la->l2_psm; | 805 | l2cap_pi(sk)->sport = la->l2_psm; |
806 | sk->sk_state = BT_BOUND; | 806 | sk->sk_state = BT_BOUND; |
807 | 807 | ||
808 | if (btohs(la->l2_psm) == 0x0001) | 808 | if (btohs(la->l2_psm) == 0x0001 || btohs(la->l2_psm) == 0x0003) |
809 | l2cap_pi(sk)->sec_level = BT_SECURITY_SDP; | 809 | l2cap_pi(sk)->sec_level = BT_SECURITY_SDP; |
810 | } | 810 | } |
811 | 811 | ||
@@ -852,6 +852,9 @@ static int l2cap_do_connect(struct sock *sk) | |||
852 | auth_type = HCI_AT_NO_BONDING_MITM; | 852 | auth_type = HCI_AT_NO_BONDING_MITM; |
853 | else | 853 | else |
854 | auth_type = HCI_AT_NO_BONDING; | 854 | auth_type = HCI_AT_NO_BONDING; |
855 | |||
856 | if (l2cap_pi(sk)->sec_level == BT_SECURITY_LOW) | ||
857 | l2cap_pi(sk)->sec_level = BT_SECURITY_SDP; | ||
855 | } else { | 858 | } else { |
856 | switch (l2cap_pi(sk)->sec_level) { | 859 | switch (l2cap_pi(sk)->sec_level) { |
857 | case BT_SECURITY_HIGH: | 860 | case BT_SECURITY_HIGH: |