Bluetooth: make L2CAP sockets to inherit parent's priority
Subsystems (2)
Luiz Augusto von Dentz
maintainerPATCH 1/2 Bluetooth: make L2CAP sockets to inherit parent's priority
From: Luiz Augusto von Dentz <[email protected]>
This makes priority set on a listen socket to be passed when accepting new connections.
--- net/bluetooth/l2cap_sock.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/bluetooth/l2cap_sock.c +1 -0
@@ -968,6 +968,7 @@ static void l2cap_sock_init(struct sock *sk, struct sock *parent)struct l2cap_chan *pchan =l2cap_pi (parent)->chan; sk->sk_type = parent->sk_type; + sk->sk_priority = parent->sk_priority;bt_sk (sk)->defer_setup =bt_sk (parent)->defer_setup; chan->chan_type = pchan->chan_type;
Signature · 1 line
1.7.6.4
Luiz Augusto von Dentz
maintainerPATCH 2/2 Bluetooth: make RFCOMM sockets to inherit parent's priority
From: Luiz Augusto von Dentz <[email protected]>
This makes priority set on a listen socket to be passed when accepting new connections.
--- net/bluetooth/rfcomm/sock.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
net/bluetooth/rfcomm/sock.c +1 -0
@@ -260,6 +260,7 @@ static void rfcomm_sock_init(struct sock *sk, struct sock *parent)if (parent) { sk->sk_type = parent->sk_type; + sk->sk_priority = parent->sk_priority; pi->dlc->defer_setup =bt_sk (parent)->defer_setup; pi->sec_level =rfcomm_pi (parent)->sec_level;
Signature · 1 line
1.7.6.4
Marcel Holtmann
maintainerHi Luiz,
Quoted 4 lines
From: Luiz Augusto von Dentz <[email protected]>
This makes priority set on a listen socket to be passed when accepting new connections.
I am in general fine with this, but is this the expected behavior of SO_PRIORITY from other socket types?
Regards
Marcel
Luiz Augusto von Dentz
maintainerHi Marcel,
Quoted 9 lines · Marcel Holtmann
Hi Luiz,
Quoted 4 lines
From: Luiz Augusto von Dentz <[email protected]>
This makes priority set on a listen socket to be passed when accepting new connections.
I am in general fine with this, but is this the expected behavior of
SO_PRIORITYfrom other socket types?
Apparently it is not inherited in other socket types, so I guess we should not inherit. In this case I will fix l2test/rctest to use setsockopt on accepted sockets, similar to what is done with SO_LINGER.
Signature · 1 line
Luiz Augusto von Dentz