Skip to content

Commit

Permalink
Bluetooth: Fix updating conn->auth_type in hci_io_capa_request_evt
Browse files Browse the repository at this point in the history
In some circumstances hci_get_auth_req will return a value different
from the current conn->auth_type. In these cases update conn->auth_type
so that when a user confirm request comes it doesn't falsely trigger
auto-accept.

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 4df378a commit 7cbc9bd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,8 @@ static inline void hci_io_capa_request_evt(struct hci_dev *hdev, struct sk_buff

bacpy(&cp.bdaddr, &ev->bdaddr);
cp.capability = conn->io_capability;
cp.authentication = hci_get_auth_req(conn);
conn->auth_type = hci_get_auth_req(conn);
cp.authentication = conn->auth_type;

if ((conn->out == 0x01 || conn->remote_oob == 0x01) &&
hci_find_remote_oob_data(hdev, &conn->dst))
Expand Down

0 comments on commit 7cbc9bd

Please sign in to comment.