Bluetooth: SMP: Fix setting unknown auth_req bits
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 11 Oct 2012 14:26:06 +0000 (16:26 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Oct 2012 17:10:20 +0000 (10:10 -0700)
commit7450d9b70adc4249cfb5575b35ccb11f4b58fd1f
tree4f80c804eb05c804f157a5a4a6aba7b614cf7483
parent8668be75982558ff50873ec256abdc881a1d25ba
Bluetooth: SMP: Fix setting unknown auth_req bits

commit 065a13e2cc665f6547dc7e8a9d6b6565badf940a upstream.

When sending a pairing request or response we should not just blindly
copy the value that the remote device sent. Instead we should at least
make sure to mask out any unknown bits. This is particularly critical
from the upcoming LE Secure Connections feature perspective as
incorrectly indicating support for it (by copying the remote value)
would cause a failure to pair with devices that support it.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/bluetooth/smp.c