Re: [PATCH] Bluetooth: Allow change security level on ATT_CID in slave role

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcin,

On Fri, Jun 13, 2014, Marcin Kraglak wrote:
> Kernel supports SMP Security Request so don't block increasing security
> when we are slave.
> 
> Signed-off-by: Marcin Kraglak <marcin.kraglak@xxxxxxxxx>
> ---
>  net/bluetooth/l2cap_sock.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
> index 6ab2822..55215eb 100644
> --- a/net/bluetooth/l2cap_sock.c
> +++ b/net/bluetooth/l2cap_sock.c
> @@ -787,11 +787,6 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname,
>  
>  		/*change security for LE channels */
>  		if (chan->scid == L2CAP_CID_ATT) {
> -			if (!conn->hcon->out) {
> -				err = -EINVAL;
> -				break;
> -			}
> -
>  			if (smp_conn_security(conn->hcon, sec.level))
>  				break;
>  			sk->sk_state = BT_CONFIG;

Acked-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>

Though this could potentially have used a bit more verbose description.
The code in question seems to originate from the early days of SMP where
we probably didn't yet have fully functioning slave-role support. Now
it's there and calls to smp_conn_security() as slave should just do the
right thing.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux