Messages in this thread Patch in this message | | | From | Arun Kumar Neelakantam <> | Subject | [PATCH 1/2] net: qrtr: Broadcast messages only from control port | Date | Wed, 4 Jul 2018 19:49:32 +0530 |
| |
The broadcast node id should only be sent with the control port id.
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org> --- net/qrtr/qrtr.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 2aa07b5..7ffc9a3 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -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 { -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
| |