]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Fix checking for exact values of boolean mgmt parameters
authorJohan Hedberg <johan.hedberg@intel.com>
Wed, 9 Jan 2013 14:05:19 +0000 (16:05 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Thu, 10 Jan 2013 08:22:51 +0000 (06:22 -0200)
commit9390721d24ded8b1d68946df6c7e20b62b796d82
treeedc8f5b83951d7e622f41b9f3c280f39bf2a58ea
parentac14f588341bd5dd795308b9e761a60f2f934302
Bluetooth: Fix checking for exact values of boolean mgmt parameters

All mgmt_set_* commands that take a boolean value encoded in the form of
a byte should only accept the values 0x00 and 0x01. This patch adds the
necessary checks for this and returns "invalid params" responses if
anything else is provided as the value.

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>
net/bluetooth/mgmt.c