Skip to content

Commit

Permalink
Bluetooth: Respect local MITM req in io_cap reply
Browse files Browse the repository at this point in the history
If host requires MITM protection notify that to controller in
io capabilities reply even if the remote device requires no bonding.

If it is not respected, host can get an unauthenticated link key while
it expects authenticated one.

Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Waldemar Rymarkiewicz authored and Gustavo F. Padovan committed Apr 28, 2011
1 parent 60b83f5 commit 58797bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2397,7 +2397,7 @@ static inline u8 hci_get_auth_req(struct hci_conn *conn)

/* If remote requests no-bonding follow that lead */
if (conn->remote_auth == 0x00 || conn->remote_auth == 0x01)
return 0x00;
return conn->remote_auth | (conn->auth_type & 0x01);

return conn->auth_type;
}
Expand Down

0 comments on commit 58797bf

Please sign in to comment.