Skip to content

Commit

Permalink
Bluetooth: Fix logic in hci_pin_code_request_evt
Browse files Browse the repository at this point in the history
The mgmt_ev_pin_code_request event should not be sent to user space if
the request gets rejected by the kernel due to the pairable flag not
being set.

Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Johan Hedberg authored and Gustavo F. Padovan committed Apr 28, 2011
1 parent be77159 commit 582fbe9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,8 +2035,7 @@ static inline void hci_pin_code_request_evt(struct hci_dev *hdev, struct sk_buff
if (!test_bit(HCI_PAIRABLE, &hdev->flags))
hci_send_cmd(hdev, HCI_OP_PIN_CODE_NEG_REPLY,
sizeof(ev->bdaddr), &ev->bdaddr);

if (test_bit(HCI_MGMT, &hdev->flags)) {
else if (test_bit(HCI_MGMT, &hdev->flags)) {
u8 secure;

if (conn->pending_sec_level == BT_SECURITY_HIGH)
Expand Down

0 comments on commit 582fbe9

Please sign in to comment.