1
0
Fork 0

net: qrtr: Broadcast messages only from control port

[ Upstream commit fdf5fd3975 ]

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

Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Arun Kumar Neelakantam 2018-07-04 19:49:32 +05:30 committed by Greg Kroah-Hartman
parent 8e39e96f23
commit 5860ae76e0
1 changed files with 4 additions and 0 deletions

View File

@ -710,6 +710,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 {