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

Commit 71bb99a0 authored by Al Viro's avatar Al Viro Committed by Marcel Holtmann
Browse files

Bluetooth: bnep: bnep_add_connection() should verify that it's dealing with l2cap socket



same story as cmtp

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 96c26653
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -533,6 +533,9 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)

	BT_DBG("");

	if (!l2cap_is_socket(sock))
		return -EBADFD;

	baswap((void *) dst, &l2cap_pi(sock->sk)->chan->dst);
	baswap((void *) src, &l2cap_pi(sock->sk)->chan->src);