linux/net/bluetooth
Bao Liang e733fb6208 Bluetooth: Set conn state to BT_DISCONN to avoid multiple responses
This patch fixes a minor issue that two connection responses will be sent
for one L2CAP connection request. If the L2CAP connection request is first
blocked due to security reason and responded with reason "security block",
the state of the connection remains BT_CONNECT2. If a pairing procedure
completes successfully before the ACL connection is down, local host will
send another connection complete response. See the following packets
captured by hcidump.

2010-12-07 22:21:24.928096 < ACL data: handle 12 flags 0x00 dlen 16
    0000: 0c 00 01 00 03 19 08 00  41 00 53 00 03 00 00 00  ........A.S.....
... ...

2010-12-07 22:21:35.791747 > HCI Event: Auth Complete (0x06) plen 3
    status 0x00 handle 12
... ...

2010-12-07 22:21:35.872372 > ACL data: handle 12 flags 0x02 dlen 16
    L2CAP(s): Connect rsp: dcid 0x0054 scid 0x0040 result 0 status 0
      Connection successful

Signed-off-by: Liang Bao <tim.bao@gmail.com>
Acked-by: Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-02-02 12:47:59 -02:00
..
bnep Bluetooth: bnep: fix information leak to userland 2010-12-01 21:04:35 -02:00
cmtp Bluetooth: cmtp: fix information leak to userland 2010-12-01 21:04:35 -02:00
hidp Bluetooth: hidp: fix information leak to userland 2010-12-01 21:04:36 -02:00
rfcomm Bluetooth: Never deallocate a session when some DLC points to it 2011-01-19 14:40:42 -02:00
af_bluetooth.c Bluetooth: Add common code for stream-oriented recvmsg() 2010-10-12 12:44:51 -03:00
hci_conn.c Bluetooth: Fix race condition with conn->sec_level 2011-01-19 14:43:11 -02:00
hci_core.c Bluetooth: Fix leaking blacklist when unregistering a hci device 2011-01-19 14:40:42 -02:00
hci_event.c Bluetooth: Fix race condition with conn->sec_level 2011-01-19 14:43:11 -02:00
hci_sock.c Bluetooth: Improve handling of HCI control channel in bind 2010-12-22 23:00:34 -02:00
hci_sysfs.c Bluetooth: make batostr() print in the right order 2010-10-12 12:44:52 -03:00
Kconfig Bluetooth: Remove L2CAP Extended Features from Kconfig 2010-07-21 10:39:04 -07:00
l2cap.c Bluetooth: Set conn state to BT_DISCONN to avoid multiple responses 2011-02-02 12:47:59 -02:00
lib.c Bluetooth: make batostr() print in the right order 2010-10-12 12:44:52 -03:00
Makefile Bluetooth: Add initial Bluetooth Management interface callbacks 2010-12-07 23:03:38 -02:00
mgmt.c Bluetooth: Add management events for controller addition & removal 2010-12-22 22:58:00 -02:00
sco.c Bluetooth: clean up sco code 2010-12-01 21:04:43 -02:00