Bluetooth: Don't send public key if OOB data verification fails
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 16 Mar 2015 16:12:57 +0000 (18:12 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 16 Mar 2015 16:17:38 +0000 (17:17 +0100)
commita8ca617c1356cafa669dc467a386787cc1d83809
tree00b6783816e50b091bb6144525ee1f77a60be0ed
parent94ea7257ef24a007cb0e26476ed8871f179a749f
Bluetooth: Don't send public key if OOB data verification fails

When we receive the remote public key, if we have remote OOB data
there's no point in sending our public key to the remote if the OOB data
doesn't match. This patch moves the test for this higher up in the
smp_cmd_public_key() function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c