Diff between a3824b4aac0e894699ca2643af5887239a6c489a and 80a6b91d758ac94d6b6d40250d68f06cd4a06097

Changed Files

File Additions Deletions Status
btio/btio.c +6 -0 modified

Full Patch

diff --git a/btio/btio.c b/btio/btio.c
index b8afe05..bc14199 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -474,6 +474,12 @@ static gboolean set_sec_level(int sock, BtIOType type, int level, GError **err)
 		return FALSE;
 	}
 
+	if (level == BT_SECURITY_FIPS) {
+		g_set_error(err, BT_IO_ERROR, EINVAL,
+				"FIPS security level is not supported for L2CAP_LM/RFCOMM_LM");
+		return FALSE;
+	}
+
 	if (type == BT_IO_L2CAP)
 		ret = l2cap_set_lm(sock, level);
 	else