]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[Bluetooth] Ignore L2CAP config requests on disconnect
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 18 Nov 2006 21:15:20 +0000 (22:15 +0100)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 22 Nov 2006 00:16:32 +0000 (16:16 -0800)
Any L2CAP connection in disconnecting state shall not response
to any further config requests from the remote side. So in case
such a request is received, ignore it.

Signed-off-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap.c

index c09d4a20d696b03666fb13eb8de799d54e87c84d..bbf78e6a7bc382d8a6014b1d076c784fbd2a2339 100644 (file)
@@ -1533,6 +1533,9 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
        if (!(sk = l2cap_get_chan_by_scid(&conn->chan_list, dcid)))
                return -ENOENT;
 
+       if (sk->sk_state == BT_DISCONN)
+               goto unlock;
+
        l2cap_parse_conf_req(sk, req->data, cmd->len - sizeof(*req));
 
        if (flags & 0x0001) {