Bluetooth: SMP: Fix using JustWorks when MITM was required
JustWorks pairing should be forced only if both sides don't require MITM. Code checking this was incorrect and forced JustWorks even if one side required MITM. Change-Id: I70312b6832218f430546896ae1f2283ae6ce7c60 Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
1baada5589
commit
89cfd86f2f
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ static uint8_t get_pair_method(struct bt_smp *smp, uint8_t remote_io)
|
|||
rsp = (struct bt_smp_pairing *)&smp->prsp[1];
|
||||
|
||||
/* if none side requires MITM use JustWorks */
|
||||
if (!(req->auth_req & rsp->auth_req & BT_SMP_AUTH_MITM)) {
|
||||
if (!((req->auth_req | rsp->auth_req) & BT_SMP_AUTH_MITM)) {
|
||||
return JUST_WORKS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue