mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket
same story as cmtp Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
96c26653ce
commit
71bb99a02b
1 changed files with 3 additions and 0 deletions
|
@ -533,6 +533,9 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)
|
||||||
|
|
||||||
BT_DBG("");
|
BT_DBG("");
|
||||||
|
|
||||||
|
if (!l2cap_is_socket(sock))
|
||||||
|
return -EBADFD;
|
||||||
|
|
||||||
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
|
baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
|
||||||
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
|
baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue