Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bluetooth: L2CAP: Handle security procedure non successful path
When getting non-zero status from security procedure on BR/EDR connection, make sure to react properly based on connection path (in or out) by sending in first case security block response if needed and in second case release hanging channel if exists in CONNECT context. > ACL Data RX: Handle 11 flags 0x02 dlen 12 [hci1] 130.819662 L2CAP: Connection Request (0x02) ident 5 len 4 PSM: 5 (0x0005) Source CID: 65 < HCI Command: Authentication Requested (0x01|0x0011) plen 2 [hci1] 130.825611 Handle: 11 > HCI Event: Command Status (0x0f) plen 4 [hci1] 130.826519 Authentication Requested (0x01|0x0011) ncmd 1 Status: Success (0x00) > HCI Event: Link Key Request (0x17) plen 6 [hci1] 130.827516 Address: 00:1A:7D:DA:71:0B (cyber-blue(HK)Ltd) < HCI Command: Host Number of Complet.. (0x03|0x0035) plen 5 [hci1] 130.828348 Num handles: 1 Handle: 11 Count: 1 < ACL Data TX: Handle 11 flags 0x00 dlen 16 [hci1] 130.829717 L2CAP: Connection Response (0x03) ident 5 len 8 Destination CID: 65 Source CID: 65 Result: Connection pending (0x0001) Status: Authentication pending (0x0001) < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22 [hci1] 130.830594 Address: 00:1A:7D:DA:71:0B (cyber-blue(HK)Ltd) Link key: fa087afc920ffe07199c803005fc5b5f > HCI Event: Command Complete (0x0e) plen 10 [hci1] 130.833513 Link Key Request Reply (0x01|0x000b) ncmd 1 Status: Success (0x00) Address: 00:1A:7D:DA:71:0B (cyber-blue(HK)Ltd) > HCI Event: PIN Code Request (0x16) plen 6 [hci1] 130.852526 Address: 00:1A:7D:DA:71:0B (cyber-blue(HK)Ltd) > HCI Event: Number of Completed Packets (0x13) plen 5 [hci1] 131.071542 Num handles: 1 Handle: 11 Count: 1 < HCI Command: PIN Code Request Negat.. (0x01|0x000e) plen 6 [hci1] 154.501040 Address: 00:1A:7D:DA:71:0B (cyber-blue(HK)Ltd) > HCI Event: Command Complete (0x0e) plen 10 [hci1] 154.502365 PIN Code Request Negative Reply (0x01|0x000e) ncmd 1 Status: Success (0x00) Address: 00:1A:7D:DA:71:0B (cyber-blue(HK)Ltd) > HCI Event: Auth Complete (0x06) plen 3 [hci1] 154.503360 Status: PIN or Key Missing (0x06) Handle: 11 < ACL Data TX: Handle 11 flags 0x00 dlen 16 [hci1] 154.506130 L2CAP: Connection Response (0x03) ident 5 len 8 Destination CID: 65 Source CID: 65 Result: Connection refused - security block (0x0003) Status: No further information available (0x0000) > HCI Event: Number of Completed Packets (0x13) plen 5 [hci1] 154.699369 Num handles: 1 Handle: 11 Count: 1 Change-Id: I9e9a9b456c00452efb4f5303aa1b1fd1fa81b758 Signed-off-by: Arkadiusz Lichwa <[email protected]>
- Loading branch information