Skip to content

Commit

Permalink
net: qrtr: Broadcast messages only from control port
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Arun Kumar Neelakantam authored and davem330 committed Jul 5, 2018
1 parent a9ba23d commit fdf5fd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/qrtr/qrtr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit fdf5fd3

Please sign in to comment.