Bluetooth: Allow setting BT_SECURITY_FIPS with setsockopt
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Thu, 24 Mar 2016 14:04:15 +0000 (16:04 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 8 Apr 2016 17:10:57 +0000 (19:10 +0200)
Update the security level check to allow setting BT_SECURITY_FIPS for
an L2CAP socket.

Signed-off-by: Patrik Flykt <patrik.flykt@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_sock.c

index e4cae72895a72bebc4c95b430d688e83cfebfada..388ee8b5914506d0a02757fa00def796ce3ede4e 100644 (file)
@@ -778,7 +778,7 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
                }
 
                if (sec.level < BT_SECURITY_LOW ||
-                   sec.level > BT_SECURITY_HIGH) {
+                   sec.level > BT_SECURITY_FIPS) {
                        err = -EINVAL;
                        break;
                }