aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index cb68b27edc9b..865716504396 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -54,6 +54,7 @@
54#include <net/bluetooth/bluetooth.h> 54#include <net/bluetooth/bluetooth.h>
55#include <net/bluetooth/hci_core.h> 55#include <net/bluetooth/hci_core.h>
56#include <net/bluetooth/l2cap.h> 56#include <net/bluetooth/l2cap.h>
57#include <net/bluetooth/smp.h>
57 58
58int disable_ertm; 59int disable_ertm;
59 60
@@ -909,12 +910,15 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
909 __clear_chan_timer(chan); 910 __clear_chan_timer(chan);
910 l2cap_state_change(chan, BT_CONNECTED); 911 l2cap_state_change(chan, BT_CONNECTED);
911 sk->sk_state_change(sk); 912 sk->sk_state_change(sk);
913 if (smp_conn_security(conn, chan->sec_level))
914 BT_DBG("Insufficient security");
912 } 915 }
913 916
914 if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { 917 if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
915 __clear_chan_timer(chan); 918 __clear_chan_timer(chan);
916 l2cap_state_change(chan, BT_CONNECTED); 919 l2cap_state_change(chan, BT_CONNECTED);
917 sk->sk_state_change(sk); 920 sk->sk_state_change(sk);
921
918 } else if (chan->state == BT_CONNECT) 922 } else if (chan->state == BT_CONNECT)
919 l2cap_do_start(chan); 923 l2cap_do_start(chan);
920 924
@@ -4060,6 +4064,11 @@ static void l2cap_recv_frame(struct l2cap_conn *conn, struct sk_buff *skb)
4060 l2cap_att_channel(conn, cid, skb); 4064 l2cap_att_channel(conn, cid, skb);
4061 break; 4065 break;
4062 4066
4067 case L2CAP_CID_SMP:
4068 if (smp_sig_channel(conn, skb))
4069 l2cap_conn_del(conn->hcon, EACCES);
4070 break;
4071
4063 default: 4072 default:
4064 l2cap_data_channel(conn, cid, skb); 4073 l2cap_data_channel(conn, cid, skb);
4065 break; 4074 break;