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

Commit fdf5fd39 authored by Arun Kumar Neelakantam's avatar Arun Kumar Neelakantam Committed by David S. Miller
Browse files

net: qrtr: Broadcast messages only from control port



The broadcast node id should only be sent with the control port id.

Signed-off-by: default avatarArun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a9ba23d4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -764,6 +764,10 @@ static int qrtr_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
	node = NULL;
	if (addr->sq_node == QRTR_NODE_BCAST) {
		enqueue_fn = qrtr_bcast_enqueue;
		if (addr->sq_port != QRTR_PORT_CTRL) {
			release_sock(sk);
			return -ENOTCONN;
		}
	} else if (addr->sq_node == ipc->us.sq_node) {
		enqueue_fn = qrtr_local_enqueue;
	} else {