Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6585a4d authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Gustavo Padovan
Browse files

Bluetooth: report the right security level in getsockopt



During a security level elevation we need to keep track of the current
security level of a connection until the new one is not confirmed.

Signed-off-by: default avatarGustavo Padovan <gustavo@padovan.org>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent a6a5568c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -379,6 +379,9 @@ static int l2cap_sock_getsockopt(struct socket *sock, int level, int optname, ch
		}

		memset(&sec, 0, sizeof(sec));
		if (chan->conn)
			sec.level = chan->conn->hcon->sec_level;
		else
			sec.level = chan->sec_level;

		if (sk->sk_state == BT_CONNECTED)