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)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 30 Oct 2012 23:26:43 +0000 (23:26 +0000)
commit2ce7b03705f186f899e45b7d6b9a657c2138ac8c
treecf63b9604c88768187097cb6edeef98aadd37314
parent69cc003f594c8697e623c78f800c4c7bcaf7c900
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: Ben Hutchings <ben@decadent.org.uk>
net/bluetooth/smp.c