Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203856
b: refs/heads/master
c: 8cb8e6f
h: refs/heads/master
v: v3
  • Loading branch information
Gustavo F. Padovan authored and Marcel Holtmann committed Jul 21, 2010
1 parent db48468 commit 4566b17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf6c2c0b9f47ee3cd12684b905725c8376d52135
refs/heads/master: 8cb8e6f1684be13b51f8429b15f39c140326b327
8 changes: 7 additions & 1 deletion trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -3052,8 +3052,14 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr
if (!sk)
return -ENOENT;

if (sk->sk_state == BT_DISCONN)
if (sk->sk_state != BT_CONFIG) {
struct l2cap_cmd_rej rej;

rej.reason = cpu_to_le16(0x0002);
l2cap_send_cmd(conn, cmd->ident, L2CAP_COMMAND_REJ,
sizeof(rej), &rej);
goto unlock;
}

/* Reject if config buffer is too small. */
len = cmd_len - sizeof(*req);
Expand Down

0 comments on commit 4566b17

Please sign in to comment.