Please sign in to comment.
Bluetooth: SMP: Fix SMP context init when sending security request
The code was not doing the right thing when we as peripheral would send a security request to the central. First of all, the SEQ_REQ flag was getting cleared by the pairing request handler, resulting in pairing_confirm() callbacks for no reason. Secondly, the behavior in encrypt_change() was not utilizing the smp_reset() helper as it should have done. Fix the situation by calling smp_init() when sending a security request, and detect that this has been done when receiving a pairing request. Also do the appropriate cleanup if the result is an encrypt change instead of a pairing request (in case we were already paired with the peer). Signed-off-by: Johan Hedberg <firstname.lastname@example.org>
- Loading branch information...