2016-03-24 14:04:15

by Patrik Flykt

[permalink] [raw]
Subject: [PATCH] bluetooth: Allow setting BT_SECURITY_FIPS with setsockopt

Update the security level check to allow setting BT_SECURITY_FIPS for
an L2CAP socket.

Signed-off-by: Patrik Flykt <[email protected]>
---

This seems to have been forgotten when FIPS was introduced?

Patrik


net/bluetooth/l2cap_sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index e4cae72..388ee8b 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -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;
}
--
2.1.4



2016-04-08 17:11:48

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH] bluetooth: Allow setting BT_SECURITY_FIPS with setsockopt

Hi Patrik,

> Update the security level check to allow setting BT_SECURITY_FIPS for
> an L2CAP socket.
>
> Signed-off-by: Patrik Flykt <[email protected]>
> ---
>
> This seems to have been forgotten when FIPS was introduced?
>
> Patrik
>
>
> net/bluetooth/l2cap_sock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel